diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-01-15 00:23:12 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-01-15 00:23:12 +0100 |
commit | 925a680a24c76587eadc5a699304f90625000659 (patch) | |
tree | c2a180ddf16e4b6cd6b3e80195aedbfb123ad781 | |
parent | 337c43ce9266106c803e6593e2006fd2b11b4f81 (diff) | |
parent | 567c246094e96ecfa5aca0fcbc321c3340699283 (diff) | |
download | nextcloud-server-925a680a24c76587eadc5a699304f90625000659.tar.gz nextcloud-server-925a680a24c76587eadc5a699304f90625000659.zip |
Merge pull request #13354 from owncloud/hhvm-redis
HHVM: Prevent E_WARNING messages by Redis test in console output.
-rw-r--r-- | tests/lib/memcache/redis.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/memcache/redis.php b/tests/lib/memcache/redis.php index c0bd18b46f9..2e3c5d735fe 100644 --- a/tests/lib/memcache/redis.php +++ b/tests/lib/memcache/redis.php @@ -16,7 +16,17 @@ class Redis extends Cache { if (!\OC\Memcache\Redis::isAvailable()) { self::markTestSkipped('The redis extension is not available.'); } + + set_error_handler( + function($errno, $errstr) { + restore_error_handler(); + self::markTestSkipped($errstr); + }, + E_WARNING + ); $instance = new \OC\Memcache\Redis(self::getUniqueID()); + restore_error_handler(); + if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) { self::markTestSkipped('redis server seems to be down.'); } |