summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-05 14:35:11 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-05 14:35:11 -0800
commit74157902d753ce09d60fe319f6eadd203f63b4b3 (patch)
tree99c3bd2d4cff224b82522b3fd876f68f79e31e6c /lib
parent5221ee0c5aaca5588e20683f397fec9d1d6e98c7 (diff)
parentcbf6b28f450e61d5072a079dac90980d03e0ecb7 (diff)
downloadnextcloud-server-74157902d753ce09d60fe319f6eadd203f63b4b3.tar.gz
nextcloud-server-74157902d753ce09d60fe319f6eadd203f63b4b3.zip
Merge pull request #1476 from owncloud/disable-error-handler-while-running-phpunit
disable error handler while running phpunit
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php8
-rw-r--r--lib/public/contacts.php4
2 files changed, 7 insertions, 5 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) {
diff --git a/lib/public/contacts.php b/lib/public/contacts.php
index 88d812e735a..44d82c37908 100644
--- a/lib/public/contacts.php
+++ b/lib/public/contacts.php
@@ -149,14 +149,14 @@ namespace OCP {
/**
* @param \OCP\IAddressBook $address_book
*/
- public static function registerAddressBook(\OCP\IAddressBook $address_book) {
+ public static function registerAddressBook($address_book) {
self::$address_books[$address_book->getKey()] = $address_book;
}
/**
* @param \OCP\IAddressBook $address_book
*/
- public static function unregisterAddressBook(\OCP\IAddressBook $address_book) {
+ public static function unregisterAddressBook($address_book) {
unset(self::$address_books[$address_book->getKey()]);
}