Я отлаживаю обновление PHP5-> 7 и получаю следующую ошибку в этом блоке кода:
PHP7 Фатальная ошибка: операторы Switch могут содержать только одно предложение по умолчанию
function adserve_cache_get_cache($data = NULL) {
static $cache = NULL;
// if we don't the the cache yet, build it
if (is_null($cache)) {
$cache = module_invoke_all('ad_build_cache');
}
if ($data) {
if (isset($cache[$data])) {
return $cache[$data];
}
else {
return NULL;
}
}
return $cache;
}
Ошибка сгенерирована с помощью инструмента phpmar.
Мне интересно, ложно ли это на основе кода комментария:
/**
* Build and return the cache.
* TODO: It's expensive to build the cache each time we serve an ad, this should
* be cached in the database, not in a static.
*/
Любая помощь будет оценена.