[BUGFIX] Initialize $currentR in analyseTypoLinks
authorBjoern Pedersen <bjoern.pedersen@frm2.tum.de>
Tue, 20 Sep 2011 05:01:59 +0000 (07:01 +0200)
committerGeorg Ringer <mail@ringerge.org>
Tue, 20 Sep 2011 06:18:18 +0000 (08:18 +0200)
There are pathes through analyseTypoLinks where currentR is
 not set, it can happen that the fetchType hook gets
called with currentR=null.

This throws an API error as the fetchType interface
requires the first arg to be an array.

Change-Id: I2d517b8c57678e645c590b51d50343c42a3d36a9
Resolves: #30043
Releases: 4.6
Reviewed-on: http://review.typo3.org/5097
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/linkvalidator/classes/class.tx_linkvalidator_processor.php

index aa038c8..2a7ae59 100644 (file)
@@ -314,6 +314,7 @@ class tx_linkvalidator_Processor {
         * @return void
         */
        private function analyseTypoLinks(array $resultArray, array &$results, $htmlParser, array $record, $field, $table) {
+               $currentR = array();
                $linkTags = $htmlParser->splitIntoBlock('link', $resultArray['content']);
                $idRecord = $record['uid'];
                for ($i = 1; $i < count($linkTags); $i += 2) {