Skip to content
Snippets Groups Projects
Commit bb6ce9f7 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Raise exception when memcache-server is down

The exception was never raised because $stats will be array(false) on failure instead of just false.
parent 7aeb580d
No related branches found
No related tags found
No related merge requests found
...@@ -439,8 +439,10 @@ class SimpleSAML_Memcache ...@@ -439,8 +439,10 @@ class SimpleSAML_Memcache
foreach (self::getMemcacheServers() as $sg) { foreach (self::getMemcacheServers() as $sg) {
$stats = $sg->getExtendedStats(); $stats = $sg->getExtendedStats();
if ($stats === false) { foreach ($stats as $server => $data) {
throw new Exception('Failed to get memcache server status.'); if ($data === false) {
throw new Exception('Failed to get memcache server status.');
}
} }
$stats = SimpleSAML\Utils\Arrays::transpose($stats); $stats = SimpleSAML\Utils\Arrays::transpose($stats);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment