From d5e9aa524332c1d7f1ab080d187eaac20695f7c7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 5 Mar 2014 18:13:43 +0100 Subject: [PATCH] Fix sfAutoload and sfCommandApplication --- lib/autoload/sfAutoload.class.php | 5 ++++- lib/command/sfCommandApplication.class.php | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/autoload/sfAutoload.class.php b/lib/autoload/sfAutoload.class.php index 26fa29122..af86fdfb5 100644 --- a/lib/autoload/sfAutoload.class.php +++ b/lib/autoload/sfAutoload.class.php @@ -129,7 +129,10 @@ public function reloadClasses($force = false) self::$freshCache = false; if ($force) { - unlink($configuration->getConfigCache()->getCacheName('config/autoload.yml')); + if (file_exists($configuration->getConfigCache()->getCacheName('config/autoload.yml'))) + { + unlink($configuration->getConfigCache()->getCacheName('config/autoload.yml')); + } } } diff --git a/lib/command/sfCommandApplication.class.php b/lib/command/sfCommandApplication.class.php index 08e6c3aa9..681d999c6 100644 --- a/lib/command/sfCommandApplication.class.php +++ b/lib/command/sfCommandApplication.class.php @@ -557,7 +557,11 @@ protected function strlen($string) protected function fixCgi() { // handle output buffering - @ob_end_flush(); + if (ob_get_level() > 0) + { + @ob_end_flush(); + } + ob_implicit_flush(true); // PHP ini settings