Issue Bug Closed

#24897PHP Warning in class.t3lib_matchcondition_abstract.php

Sven Juergens 01/30/11, 22:55 updated 02/26/11, 01:11

Description

i got the following PHP Warning
PHP Warning: implode() [function.implode]: Invalid arguments passed in /…/typo3_src-4.5.0/t3lib/matchcondition/class.t3lib_matchcondition_abstract.php line 262

this is the following line
$allSystems .= ‘ ‘ . implode(’ ‘, $browserInfo[‘all_systems’]);
problem is the definition of $browserInfo[‘all_systems’] in class.t3lib_utility_client.php as empty string

for information in $browserInfo[‘all_systems’] there is used the sended userAgent from your Browser, but if some clients don’t send the userAgent $browserInfo[‘all_systems’] is still an string

Solution:
set $browserInfo[‘all_systems’] = array();

how to reproduce:

set in TypoScript a condition system condition like

[system = mac]
// do something
[global]

after that call the page width that condtition and use Firefox Addon Tamper Data, to delete your userAgent.
(issue imported from #M17412)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.