summaryrefslogtreecommitdiff
path: root/framework/PradoBase.php
diff options
context:
space:
mode:
authorrojaro <>2009-11-01 20:36:03 +0000
committerrojaro <>2009-11-01 20:36:03 +0000
commit5c888162b89be2bcc18986e11f4f9e11d9421fbf (patch)
tree198d8748dba29fde3d8a19e4aa0548d08e337f58 /framework/PradoBase.php
parent0238f964a8412ac426051632c65c9d6f2f78c49b (diff)
fixed error handler to detect changes in the error reporting level after initialisation as suggested by acron in http://www.pradosoft.com/forum/index.php?topic=12226.0
Diffstat (limited to 'framework/PradoBase.php')
-rw-r--r--framework/PradoBase.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/framework/PradoBase.php b/framework/PradoBase.php
index 3bf747df..1819b72f 100644
--- a/framework/PradoBase.php
+++ b/framework/PradoBase.php
@@ -71,7 +71,7 @@ class PradoBase
*/
public static function getVersion()
{
- return '3.2-dev';
+ return '3.2-dev';
}
/**
@@ -84,7 +84,7 @@ class PradoBase
/**
* Sets error handler to be Prado::phpErrorHandler
*/
- set_error_handler(array('PradoBase','phpErrorHandler'),error_reporting());
+ set_error_handler(array('PradoBase','phpErrorHandler'));
/**
* Sets exception handler to be Prado::exceptionHandler
*/
@@ -132,7 +132,7 @@ class PradoBase
*/
public static function phpErrorHandler($errno,$errstr,$errfile,$errline)
{
- if(error_reporting()!=0)
+ if(error_reporting() & $errno)
throw new TPhpErrorException($errno,$errstr,$errfile,$errline);
}
@@ -639,5 +639,3 @@ class TReflectionClass extends ReflectionClass
PradoBase::using('System.TComponent');
PradoBase::using('System.Exceptions.TException');
PradoBase::using('System.Util.TLogger');
-
-?>