Remove unused local variables
authorMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jul 2017 18:48:07 +0000 (20:48 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jul 2017 18:48:07 +0000 (20:48 +0200)
wcfsetup/install/files/lib/data/article/ArticleAction.class.php
wcfsetup/install/files/lib/system/html/simple/HtmlSimpleParser.class.php

index 802da5204fc5afa2132a1206e3ffadc326236887..4b54c9f37340400aaa356235e535c8cf388543a0 100644 (file)
@@ -445,9 +445,7 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                        $this->readObjects();
                }
                
-               $articleIDs = [];
                foreach ($this->getObjects() as $article) {
-                       $articleIDs[] = $article->articleID;
                        VisitTracker::getInstance()->trackObjectVisit('com.woltlab.wcf.article', $article->articleID, $this->parameters['visitTime']);
                }
                
index 77e3fc05afb8b851698bbe79c69b42eaf4d5e5e1..b6834ac432cb89db1ff5dee2dd51a7225a1de5ad 100644 (file)
@@ -106,7 +106,7 @@ class HtmlSimpleParser extends SingletonFactory {
                MessageEmbeddedObjectManager::getInstance()->setActiveMessage($objectType, $objectID);
                $this->setContext($objectType, $objectID);
                
-               return preg_replace_callback($this->regexHandlers, function ($matches) use ($objectType, $objectID) {
+               return preg_replace_callback($this->regexHandlers, function ($matches) {
                        $data = $this->parseAttributes($matches[1]);
                        
                        return $this->replaceTag($data);