Bug #22154
closedPHP Warning from t3lib_loadmodules after installing extbase, because $TBE_MODULES['_dispatcher'] is not unset.
0%
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
Updated by Benni Mack over 14 years ago
Hey Marc,
Thanks for the info. Could you provide a patch for this? Thanks.
Updated by Marc Bastian Heinrichs over 14 years ago
Hey Benjamin,
I attached a patch.
Updated by Marc Bastian Heinrichs over 14 years ago
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.
Updated by Marc Bastian Heinrichs over 14 years ago
Thread in mailing list:
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-February/003342.html
Updated by Marc Bastian Heinrichs over 14 years ago
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"
Updated by Marc Bastian Heinrichs over 14 years ago
Cause of no reaction in the mailing list I reported an issue with a patch for extbase.
http://forge.typo3.org/issues/show/7180
I will also attach an updated patch for the core.
Updated by Marc Bastian Heinrichs over 14 years ago
Naming of array key _configuration could be optimised, in coordination with the extbase patch.
Updated by Chris topher over 14 years ago
Hi Marc,
I just noticed, that you posted your bug fix in the wrong newsgroup.
To get the problem fixed, please post the issue in the TYPO3-Core-list.
Check out
http://typo3.org/teams/core/core-mailinglist-rules
Updated by Marc Bastian Heinrichs over 14 years ago
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
Updated by Marc Bastian Heinrichs over 14 years ago
by the way, this bug is related to #20838
Updated by Helmut Hummel over 14 years ago
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?
Updated by Chris topher over 14 years ago
Hi Marc Bastian,
I didn't know that.
I just saw your patch and thought that that was the fix you proposed. ;-)
Updated by Marc Bastian Heinrichs over 14 years ago
@Helmut:
yep, Jochen has it on his TODO-list for v4.4
Updated by Jochen Rau over 14 years ago
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 ;-) )