Cette application n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Ticket #1091 (confirmed bug)
PHP crashes on particuliar cases when having 2 controllers with same name (in 2 modules)
|Reported by:||bricet||Owned by:|
|Hosting Provider:||Php version:|
I don't perceive how general this problem is. I guess it may appear with plugin coordinators. May be it is even more general.
Here is a simple way to reproduce :
- use jAuth
- in module modA, create a controller called 'myCont'
- in module modB, create a controller called 'myCont'
- create an action in modA (e.g. actA) and modB (e.g. actB)
- set actA as needing authentication using 'auth.required'=>true in modA~myCont's pluginParams
- set on_error_action = "modB~myCont:actB" in auth.coord.ini.php
- try accessing modA~myCont:actA in your browser
PHP crashes telling :
Fatal error: Cannot redeclare class myContCtrl in .../modules/modB/controllers/myCont.classic.php on line X
(BTW, using apc is even worse because nothing is displayed. You thus have to look to apache's error.log).
So this problem is due to the fact that 2 controllers have the same name.
In this particular case, this seems to be due to AuthCoordPlugin? which redefines the action selector. I guess this is due to a design problem, so I have no clue to tell how is the best way to solve that ... instead of renamming one of the controllers, which I am going to do right now as a quick personnal fix ...
- Owner set to laurentj
- Component changed from jelix to jelix:core
- Milestone set to Jelix 2.0
- Status changed from confirmed to assigned
- Owner changed from laurentj to none