diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-31 22:05:06 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-05 16:44:02 +0100 |
commit | 77369d8164dfcd958cc2192dd8c86bfc15310cfd (patch) | |
tree | a58b93c84a05488a922c74c19114539ba7c5692b /lib/base.php | |
parent | 86f4126d2c83a4f796ece79c0eecdec854b31138 (diff) | |
download | nextcloud-server-77369d8164dfcd958cc2192dd8c86bfc15310cfd.tar.gz nextcloud-server-77369d8164dfcd958cc2192dd8c86bfc15310cfd.zip |
disable error handler while running phpunit
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php index 90e64f13af6..b432f282aaf 100644 --- a/lib/base.php +++ b/lib/base.php @@ -402,9 +402,11 @@ class OC { self::initPaths(); - register_shutdown_function(array('OC_Log', 'onShutdown')); - set_error_handler(array('OC_Log', 'onError')); - set_exception_handler(array('OC_Log', 'onException')); + if (!defined('PHPUNIT_RUN')) { + register_shutdown_function(array('OC_Log', 'onShutdown')); + set_error_handler(array('OC_Log', 'onError')); + set_exception_handler(array('OC_Log', 'onException')); + } // set debug mode if an xdebug session is active if (!defined('DEBUG') || !DEBUG) { |