[BUGFIX] Fix sql error in EXT:linkvalidator 47/49547/2
authorDaniel Windloff <daniel.jc.windloff@googlemail.com>
Tue, 23 Aug 2016 05:56:24 +0000 (07:56 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 23 Aug 2016 18:56:07 +0000 (20:56 +0200)
If no page is selected, skip sql queries in LinkAnalyzer
getLinkStatistics.

Resolves: #77588
Releases: master, 7.6, 6.2
Change-Id: I3b45cbad6962c5327d860b182e61255018bf0e53
Reviewed-on: https://review.typo3.org/49547
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php

index 8e467a5..1c310ac 100644 (file)
@@ -137,9 +137,9 @@ class LinkAnalyzer
     public function getLinkStatistics($checkOptions = array(), $considerHidden = false)
     {
         $results = [];
-        if (!empty($checkOptions)) {
+        $pidList = GeneralUtility::intExplode(',', $this->pidList, true);
+        if (!empty($checkOptions) && !empty($pidList)) {
             $checkKeys = array_keys($checkOptions);
-            $pidList = GeneralUtility::intExplode(',', $this->pidList, true);
 
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
                 ->getQueryBuilderForTable('tx_linkvalidator_link');