summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-05-12 20:14:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-05-12 20:14:48 +0200
commitc5e98652982d0d04b4687f7779d2a0e4f7c936c8 (patch)
tree8e36b4c8c6c0b1532224ef22dc1199e568fe3e9c /application
parentacbe0e4cd2c3b839a5f6f499eea059977976cdba (diff)
Hide notice when getting key from memcache
This looks horrible, but gets the job done... Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/libraries/MemcacheLibrary.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/application/libraries/MemcacheLibrary.php b/application/libraries/MemcacheLibrary.php
index dcc08b942..dc993b7a5 100644
--- a/application/libraries/MemcacheLibrary.php
+++ b/application/libraries/MemcacheLibrary.php
@@ -90,7 +90,15 @@ class MemcacheLibrary {
*/
public function get($key) {
$this->logDebugMessage(sprintf("%s key requested from memcache", $key));
- return $this->memcachedInstance->get($key);
+
+ // hide notice if server is unreachable
+ $old_error_level = error_reporting();
+ error_reporting($old_error_level & ~E_NOTICE);
+
+ $ret = $this->memcachedInstance->get($key);
+
+ error_reporting($old_error_level);
+ return $ret;
}
/**