[TYPO3-core] FYI: Fixed bug: PHP 5.3 throws a warning in class.t3lib_befunc.php on line 3348: trim() expects parameter 1 to be string, array given
Ingo Renner
ingo at typo3.org
Wed Aug 6 20:04:01 CEST 2008
Hi all,
I just fixed this nobrainer... As I'm currently trying out PHP 5.3alpha1
I stumbled over this warning 5.3 throws now:
PHP Warning: trim() expects parameter 1 to be string, array given in
/Users/ingo/Projects/TYPO3/src/typo3_src-trunk_2/t3lib/class.t3lib_befunc.php
on line 3348
I fixed it by changing this:
if (trim($list)) {
to this:
if (!is_array($list) && trim($list)) {
with the is_array() check in place PHP will stop the execution of the if
statement as soon as the first condition (in this case is_array) fails.
best
Ingo
--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: php53_trim.diff
Type: text/x-diff
Size: 633 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080806/468373d7/attachment.diff
More information about the TYPO3-team-core
mailing list