[BUGFIX] SQL error in getLinkCounts
authorPhilipp Gampe <dev@philippgampe.info>
Tue, 27 Nov 2012 02:40:28 +0000 (03:40 +0100)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Tue, 27 Nov 2012 02:46:29 +0000 (03:46 +0100)
A comma too much at the list of page ids results in an SQL error.

Solution: Remove any trailing comma.

Fixes: #43322
Releases: 6.0, 4.7, 4.6, 4.5

Change-Id: Ibd4ee2b0d6c5762dd89b9f6fac20740f6a6ec228
Reviewed-on: http://review.typo3.org/16775
Reviewed-by: Stefan Neufeind
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php

index 5dbeb6a..3894dd8 100644 (file)
@@ -366,6 +366,7 @@ class LinkAnalyzer {
                if (empty($this->pidList)) {
                        $this->pidList = $curPage;
                }
+               $this->pidList = rtrim($this->pidList, ',');
                if (($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                        'count(uid) as nbBrokenLinks,link_type',
                        'tx_linkvalidator_link',