Skip to content
Snippets Groups Projects
Commit a4a73d3f authored by Olav Morken's avatar Olav Morken
Browse files

Memcache: Remove error_log calls in SimpleSAML_Memcache and SimpleSAML_MemcacheStore.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@561 44740490-163a-0410-bde0-09ae8108e29a
parent e3adb660
No related branches found
No related tags found
No related merge requests found
<?php
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/Configuration.php');
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/Logger.php');
/**
* This file implements functions to read and write to a group of memcache
......@@ -57,17 +58,17 @@ class SimpleSAML_Memcache {
* - 'data': The data.
*/
if(!is_array($info)) {
error_log('Retrieved invalid data from a memcache server.' .
SimpleSAML_Logger::warning('Retrieved invalid data from a memcache server.' .
' Data was not an array.');
continue;
}
if(!array_key_exists('timestamp', $info)) {
error_log('Retrieved invalid data from a memcache server.' .
SimpleSAML_Logger::warning('Retrieved invalid data from a memcache server.' .
' Missing timestamp.');
continue;
}
if(!array_key_exists('data', $info)) {
error_log('Retrieved invalid data from a memcache server.' .
SimpleSAML_Logger::warning('Retrieved invalid data from a memcache server.' .
' Missing data.');
continue;
}
......@@ -358,18 +359,14 @@ class SimpleSAML_Memcache {
/* The 'memcache_store.expires' option must be an integer. */
if(!is_integer($expire)) {
$e = 'The value of \'memcache_store.expires\' in the' .
' configuration must be a valid integer.';
error_log($e);
die($e);
throw new Exception('The value of \'memcache_store.expires\' in the' .
' configuration must be a valid integer.');
}
/* It must be a positive integer. */
if($expire < 0) {
$e = 'The value of \'memcache_store.expires\' in the' .
' configuration can\'t be a negative integer.';
error_log($e);
die($e);
throw new Exception('The value of \'memcache_store.expires\' in the' .
' configuration can\'t be a negative integer.');
}
/* If the configuration option is 0, then we should
......
......@@ -3,6 +3,7 @@
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/Utilities.php');
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/ModifiedInfo.php');
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/Memcache.php');
require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSAML/Logger.php');
/**
* This class provides a class with behaviour similar to the $_SESSION variable.
......@@ -66,7 +67,7 @@ class SimpleSAML_MemcacheStore {
}
if(!($data instanceof self)) {
error_log('Retrieved key from memcache did not contain a MemcacheStore object.');
SimpleSAML_Logger::warning('Retrieved key from memcache did not contain a MemcacheStore object.');
return NULL;
}
......
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