Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
5.1
-
Any.
Description
If the controller executed makes use of runLegacyCallback, things will get ugly.
Real example: Legacy calls a controller which uses eZFind and thus also runCallback.
public function runCallback( \Closure $callback, $postReinitialize = true ) { $this->enterLegacyRootDir(); $return = parent::runCallback( $callback, $postReinitialize ); $this->leaveLegacyRootDir(); return $return; }
The culprit can been seen here. First one enters the legacy-directory, and all is good. Then leaveLegacyRootDir() puts the script in the web-directory. The remaining legacy code executed after the Symfony-controller will then be executed within the wrong working directory. This causes all sorts of fun to happen. Crashing code, ini-cache-corruption...
The ini-cache corruption causes the setup-wizard to be displayed; even in an production environment. Needless to say, this is very much unwanted.
The code above should simply store the current working-directory and then restore it.
Attachments
Issue Links
- duplicates
-
EZP-21751 kernel::runcallback() does not always return to correct directory
- Closed