Bug #38444
closedPHP 5.4 issue?!
0%
Description
Hey guys,
I am experiencing the following error while running TYPO3 4.7.1 on PHP 5.4. It spams my logfile incredibly (seems like it's occurying everytime I render the website).
Core: Error handler (BE): PHP Warning: Illegal string offset 'description' in t3lib/class.t3lib_befunc.php line 2440
Could someone please further investigate this issue and fix it? Would be great!
Thanks,
bennib2
Updated by Markus Klein over 12 years ago
Hi!
I'm not sure if this has anything to do with PHP 5.4.
Could you please debug the value of $helpTextArray in line 2438?
Thanks.
Updated by Philipp Gampe over 12 years ago
On PHP 5.4 you need to explicitly exclude E_STRICT from error reporting.
Either use the latest git version of TYPO3_4-7 or apply those changes by hand:
https://review.typo3.org/#/c/11636/2
Updated by Benjamin Bremmer over 12 years ago
Thanks for the hint regarding E_STRICT Philipp.
However, after adding the latest code I still get loads of errors, even if line 2440-errors seem to have been reduced the following is just an extraction of what keeps spamming my logs. It seems the errors is always the same while it affects different files etc.
Core: Error handler (BE): PHP Warning: Illegal string offset 'keepNonMatchedTags' in t3lib/class.t3lib_parsehtml.php line 1466
Core: Error handler (BE): PHP Warning: Illegal string offset 'xhtml_cleaning' in t3lib/class.t3lib_parsehtml.php line 1460
Core: Error handler (BE): PHP Warning: Illegal string offset 'removeTags' in t3lib/class.t3lib_parsehtml.php line 1449
Core: Error handler (BE): PHP Warning: Illegal string offset 'noAttrib' in t3lib/class.t3lib_parsehtml.php line 1438
Core: Error handler (BE): PHP Warning: Illegal string offset 'rmTagIfNoAttrib' in t3lib/class.t3lib_parsehtml.php line 1427
Core: Error handler (BE): PHP Warning: Illegal string offset 'globalNesting' in t3lib/class.t3lib_parsehtml.php line 1416
Core: Error handler (BE): PHP Warning: Illegal string offset 'localNesting' in t3lib/class.t3lib_parsehtml.php line 1408
Core: Error handler (BE): PHP Warning: Illegal string offset 'tags.' in t3lib/class.t3lib_parsehtml.php line 1366
Core: Error handler (BE): PHP Warning: Illegal string offset 'allowTags' in t3lib/class.t3lib_parsehtml.php line 1362
Core: Error handler (BE): PHP Warning: Illegal string offset 'description' in t3lib/class.t3lib_befunc.php line 2440
Core: Error handler (BE): PHP Warning: Illegal string offset 'uid' in typo3/sysext/beuser/class.tx_beuser_switchbackuser.php line 31
Core: Error handler (BE): PHP Warning: Illegal string offset 'uid' in t3lib/class.t3lib_befunc.php line 3098
I also do get this one quite a lot while working on be-users:
Core: Error handler (BE): PHP Runtime Notice: call_user_func() expects parameter 1 to be a valid callback, non-static method Tx_Extbase_Utility_Extension::configureModule() should not be called statically in t3lib/class.t3lib_loadmodules.php line 228
Or this while doing file-ops:
Core: Error handler (BE): PHP Runtime Notice: Declaration of fileList::listURL() should be compatible with t3lib_recordList::listURL($altId = '') in typo3/class.file_list.inc line 47
I guess they relate to each other?
Unfortunately, I have never been developing in PHP and only understand very little. Thus, I am not sure about how to debug the function. If you could help me with that, that would be great. The server this installation is running on also is only a shared one thus I am not able to execute command-line tasks :(
Updated by Philipp Gampe over 12 years ago
Benjamin Bremmer wrote:
Thanks for the hint regarding E_STRICT Philipp.
However, after adding the latest code I still get loads of errors, even if line 2440-errors seem to have been reduced the following is just an extraction of what keeps spamming my logs. It seems the errors is always the same while it affects different files etc.Core: Error handler (BE): PHP Warning: Illegal string offset 'keepNonMatchedTags' in t3lib/class.t3lib_parsehtml.php line 1466
Are you sure that you have not change the error reporting in install tool? Please make sure that those are not set in typo3conf/localconf.php
.
I only looked into the first error, but I expect them to be similar. The code a that line tries to read an array entry that does not exist at that point. This means that the code assumes something to be there which is not. This must fail obviously.
The solution depends on what the code tries to archive.
In this particular case, one could just check if the entry is set and append it or not, but on other cases one might need to make sure that the entry exists at that point.
I also do get this one quite a lot while working on be-users:
Core: Error handler (BE): PHP Runtime Notice: call_user_func() expects parameter 1 to be a valid callback, non-static method Tx_Extbase_Utility_Extension::configureModule() should not be called statically in t3lib/class.t3lib_loadmodules.php line 228
I go that one too. This is a real bug, because a function is used the way it should not be used. I looked into it and there is not trivial fix. But this is a good indication that E_STRICT
is still active (see comment above).
Or this while doing file-ops:
Core: Error handler (BE): PHP Runtime Notice: Declaration of fileList::listURL() should be compatible with t3lib_recordList::listURL($altId = '') in typo3/class.file_list.inc line 47
I guess one class extends the other and the number of parameters do not match. That is actually the underlaying C code that punches in your face ;)
I guess they relate to each other?
Except for the last one, I am pretty sure that all are a result of the error reporting caring about E_STRICT
errors.
Unfortunately, I have never been developing in PHP and only understand very little. Thus, I am not sure about how to debug the function. If you could help me with that, that would be great. The server this installation is running on also is only a shared one thus I am not able to execute command-line tasks :(
Well, the best thing you can do is to get a fresh git checkout of the branch TYPO3_4-7
. http://wiki.typo3.org/Git_Clone
Then upload the sources again.
Please note that PHP 5.4 is not fully tested on TYPO3v4, but it should all work if you remove E_STRICT
from error reporting.
Most new code is 100% compatible with PHP 5.4, but there are tons of old code still being around from PHP 4 times.
Updated by Mario Rimann over 12 years ago
- Status changed from New to Resolved
Applied in changeset d8f537d182dbe5ca0f3c8dfb10a13e06520e95c3.
Updated by Benjamin Bremmer over 12 years ago
after checking out the latest dev version and cleaning out my localconf.php the errors no longer show up in my log – thanks a lot for everybodys help!
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed