Bug #22154
closed
PHP Warning from t3lib_loadmodules after installing extbase, because $TBE_MODULES['_dispatcher'] is not unset.
Added by Marc Bastian Heinrichs almost 15 years ago.
Updated over 14 years ago.
Description
An mechanism was introduced in typo3/mod.php to use external dispatcher for backend modules based on extbase.
These dispatchers are registered in $TBE_MODULES['_dispatcher'] as values of an array,
but in line 541 ($subsArr = t3lib_div::trimExplode(',', $subs) ) in function parseModulesArray it is expected, that $TBE_MODULES['_dispatcher'] is an string.
To solve this, I think $TBE_MODULES['_dispatcher'] should not be parsed and has to be unset in t3lib_loadModules::load how it's done with $TBE_MODULES['_PATHS'].
I defined this as major bug, because with the new default error handling the syslog is full of php warnings.
(issue imported from #M13604)
Files
Hey Marc,
Thanks for the info. Could you provide a patch for this? Thanks.
Hey Benjamin,
I attached a patch.
Hey Benjamin,
there are more problems with extbase, because the registering of extbase based BE modules causes the same error.
Percaps the complete handling for extbase BE modules should be changed.
I think, you can wait till this is discussed by the extbase team.
This demo snippet
---------8<------------------------
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', true);
$test = array();
$test2 = explode(',', $test);
---------8<------------------------
throws no warning with php 5.2.x.
With php 5.3.x you get following warning:
"Warning: explode() expects parameter 2 to be string, array given in /var/www/XYZ/test.php on line 8"
Naming of array key _configuration could be optimised, in coordination with the extbase patch.
Hi Christopher,
just let you know, that I posted my question (no bug fix) about the wrong behaviour of extbase (not the core) to the right newsgroup, the mvc newsgroup, to get some feedback from the guys, who implemented this concept.
Btw., I am aware of the core mailing list rules.
regards,
Marc Bastian
by the way, this bug is related to #20838
The v2 patch works for me and looks good so far.
@Marc do you mind sending it to the core lest, or is still some discussion with the extbase team necessary?
Hi Marc Bastian,
I didn't know that.
I just saw your patch and thought that that was the fix you proposed. ;-)
@Helmut:
yep, Jochen has it on his TODO-list for v4.4
The patch looks good to me. I have tested it in conjunction with the necessary patch for extbase:
http://forge.typo3.org/issues/show/7180
@Marc: could you please post your solution to the core list. I will apply my +1 there (and hopefully Helmut does the same ;-) )
Also available in: Atom
PDF