[TYPO3-core] RFC: Handling of $this->altRootline in class.t3lib_matchcondition.php

Andreas Otto ao-lists at php4win.de
Thu Oct 13 09:49:10 CEST 2005

This is a CVS patch request.

Type: (Bugfix / New feature / Code cleanup)
Code cleanup

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 

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

Branches: (HEAD / TYPO3_3-8 / TYPO3_3-7)

Bugtracker reference:


If there are no objections I will commit the patch to CVS.


Noch 4313731 Sekunden...

Commitment, n.:
	Commitment can be illustrated by a breakfast of ham and eggs.
The chicken was involved, the pig was committed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.t3lib_matchcondition.php.patch
Type: text/x-diff
Size: 728 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051013/98b68336/attachment.bin 

More information about the TYPO3-team-core mailing list