ZF-11116: A bug report with a correction.
I met a bug on Zend Framework 1.11.3 while using Zend_Config_Writer_Array::write().
This method generates a PHP file containing an array() with all data from an ini file, here is the code from my "public/index.php" :
$config = new Zend_Config_Ini(APPLICATION_PATH . "/configs/application.ini"); $writer = new Zend_Config_Writer_Array(array("config" => $config, "filename" => $cache_filename)); $writer->write();
In fact, my idea is to create a compiled PHP structure to prevent parsing the "application.ini" file at each execution, next to this I created the Zend_Application with this parameters :
$application = new Zend_Application( APPLICATION_ENV, $cache_filename );
With this code, I have an exception on the default controllers directory wich was not defined.
This is caused by an issue on the Zend_Application class at line 404, the 'php'/'inc' case return the config structure without taking account of the $environment variable (contrary to the other cases, indirectly by $config->toArray() at line 410), this gives an array incompatible with the rest of the process.
So the only fix I made on my side was at line 404 :
All seems to be ok on my version since this modification.
Best regards, Cédric Tailly