Using a more specific function to check for numbers on redis engine read

This commit is contained in:
José Lorenzo Rodríguez 2012-03-28 23:22:30 -05:30
parent e6a87bac40
commit 4958f0ee5d

View file

@ -114,7 +114,7 @@ class RedisEngine extends CacheEngine {
*/
public function read($key) {
$value = $this->_Redis->get($key);
if (is_numeric($value)) {
if (ctype_digit($value)) {
$value = (int) $value;
}
if ($value !== false && is_string($value)) {