matthiasmullie / scrapbook

PHP cache library, with adapters for e.g. Memcached, Redis, Couchbase, APC(u), SQL and additional capabilities (e.g. transactions, stampede protection) built on top.
https://www.scrapbook.cash
MIT License
315 stars 27 forks source link

Getting warning while get from APC #34

Closed chekalsky closed 6 years ago

chekalsky commented 6 years ago

Warning became to appear on PHP 7.2

src/Adapters/Apc.php:86

$values = $this->apcu_fetch($keys);

$tokens = array();
foreach ($values as $key => $value) {
       $tokens[$key] = serialize($value);
}

Warning on foreach line: Invalid argument supplied for foreach()

$values at this point equals false. $keys is array with one string.

Scrapbook v 1.4.5 PHP 7.2