diff --git a/cachefile.php b/cachefile.php index a887294..dfe347e 100644 --- a/cachefile.php +++ b/cachefile.php @@ -157,7 +157,7 @@ class cachefile throw new \Exception ("CacheFile TTL invalid : not integer or negative". " : '$ttl'", 500); - if (! is_string ($id) || ! is_integer ($id)) + if (! is_string ($id) && ! is_integer ($id)) throw new \Exception ("CacheFile write ID not a string : ".gettype ($id), 500);