Project

General

Profile

Actions

Bug #15046

closed

Handling of $this->altRootline in class.t3lib_matchcondition.php

Added by Andreas Otto † about 19 years ago. Updated about 19 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

While working with TS in a BE module I discovered that  this creates PHP
warnings because of not serving the right variable type to array functions:

    1:  {main}()
    2:  tx_dkdstaticupload_module1->init()
    3:  t3lib_TStemplate->start()
    4:  t3lib_TStemplate->matching()
    5:  t3lib_matchCondition->match()
    6:  reset()

Basically this is all about the variable “$this->altRootLine” which should
always be an array. In my case this variable is set to an empty string on
line 4 of the stack trace above. A solution would be to check on line 5 if
“$this->altRootLine” is an array or not and then set it as an empty array if
needed:

    1: if ( !is_array( $this->altRootLine ) ) {
    2:     $this->altRootLine = array();
    3: }

(issue imported from #M1594)


Files

class.t3lib_matchcondition.php.patch (728 Bytes) class.t3lib_matchcondition.php.patch Administrator Admin, 2005-10-13 09:45

No data to display

Actions

Also available in: Atom PDF