Module: nagvis Branch: master Commit: 577427aadf865df85204fe46205384032bf9b55a URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=577427aadf865df85204fe46205384032bf9b55a
Author: Lars Michelsen <[email protected]> Date: Wed Nov 10 18:29:12 2010 +0100 Livestatus backend: Better error handling when writing to livestatus socket --- .../core/classes/GlobalBackendmklivestatus.php | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php b/share/server/core/classes/GlobalBackendmklivestatus.php index 6b9eb68..16fb6ff 100644 --- a/share/server/core/classes/GlobalBackendmklivestatus.php +++ b/share/server/core/classes/GlobalBackendmklivestatus.php @@ -194,7 +194,10 @@ class GlobalBackendmklivestatus implements GlobalBackendInterface { // Query to get a json formated array back // Use KeepAlive with fixed16 header $query .= "OutputFormat:json\nKeepAlive: on\nResponseHeader: fixed16\n\n"; + // Disable regular error reporting to suppress php error messages + $oldLevel = error_reporting(0); $write = fwrite($this->SOCKET, $query); + error_reporting($oldLevel); if($write=== false) throw new BackendConnectionProblem(GlobalCore::getInstance()->getLang()->getText('Problem while writing to socket [SOCKET] in backend [BACKENDID]: [MSG]', ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
