From 10f61c7e88380ae2a553073ebf14891d75fd874d Mon Sep 17 00:00:00 2001 From: Phillip Dornauer Date: Wed, 4 Jan 2012 11:22:04 +0100 Subject: [PATCH] Fixed error level --- Monitr.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Monitr.php b/Monitr.php index 8af28c9..fbd767c 100644 --- a/Monitr.php +++ b/Monitr.php @@ -149,10 +149,7 @@ private function api( $method, $params ){ */ public function log( $message, $error_code = E_WARNING ){ $trace = debug_backtrace(); - - if( ! $error_code & $this->errorCode ) - return false; - + return $this->logError( $message, $error_code, $trace[0]["file"], $trace[0]["line"] ); } @@ -195,7 +192,7 @@ private function registerShutdownFunction(){ public function logError( $message, $code, $file, $line ){ - if( ! $code & $this->errorLevel ) + if( ! ( $code & $this->errorLevel ) ) return false; return $this->api( "log", array(