[icinga-checkins] icinga.org: icinga-web/master: * Avoiding 'silent' errors result in exceptions

git at icinga.org git at icinga.org
Thu Nov 4 16:39:34 CET 2010


Module: icinga-web
Branch: master
Commit: 02c03dc62a028e372f3ed4ca15a0dd7588224fcf
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=02c03dc62a028e372f3ed4ca15a0dd7588224fcf

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Nov  4 16:39:12 2010 +0100

* Avoiding 'silent' errors result in exceptions

---

 lib/agavi/src/exception/AgaviException.class.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/agavi/src/exception/AgaviException.class.php b/lib/agavi/src/exception/AgaviException.class.php
index a726f7d..8558053 100755
--- a/lib/agavi/src/exception/AgaviException.class.php
+++ b/lib/agavi/src/exception/AgaviException.class.php
@@ -246,7 +246,9 @@ class AgaviException extends Exception
 		$exitCode = 70;
 		
 		// discard any previous output waiting in the buffer
-		while(@ob_end_clean());
+		if (ob_get_length()) {
+			while(@ob_end_clean());
+		}
 		
 		if($container !== null && $container->getOutputType() !== null && $container->getOutputType()->getExceptionTemplate() !== null) { 
 			// an exception template was defined for the container's output type
@@ -280,4 +282,4 @@ class AgaviException extends Exception
 	}
 }
 
-?>
\ No newline at end of file
+?>





More information about the icinga-checkins mailing list