[FrameworkBundle] Workaround php -S ignoring auto_prepend_file

This commit is contained in:
Nicolas Grekas 2015-04-08 20:26:59 +02:00
parent e140c7f3bd
commit dcde4458f0
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,11 @@
* @author: Albert Jessurum <ajessu@gmail.com>
*/
// Workaround https://bugs.php.net/64566
if (ini_get('auto_prepend_file') && !in_array(realpath(ini_get('auto_prepend_file')), get_included_files(), true)) {
require ini_get('auto_prepend_file');
}
if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) {
return false;
}

View File

@ -21,6 +21,11 @@
* @author: Albert Jessurum <ajessu@gmail.com>
*/
// Workaround https://bugs.php.net/64566
if (ini_get('auto_prepend_file') && !in_array(realpath(ini_get('auto_prepend_file')), get_included_files(), true)) {
require ini_get('auto_prepend_file');
}
if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) {
return false;
}