diff --git a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php index e4d8ad5eea318..c272ad0a4ae5f 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php @@ -373,15 +373,15 @@ private function generateItems(array $keys) */ public static function throwOnRequiredClass($class) { - $e = new \ReflectionException(sprintf('Class %s does not exist', $class)); + $e = new \ReflectionException("Class $class does not exist"); $trace = $e->getTrace(); $autoloadFrame = array( 'function' => 'spl_autoload_call', 'args' => array($class), ); - $i = array_search($autoloadFrame, $trace); + $i = 1 + array_search($autoloadFrame, $trace, true); - if (false !== $i++ && isset($trace[$i]['function']) && !isset($trace[$i]['class'])) { + if (isset($trace[$i]['function']) && !isset($trace[$i]['class'])) { switch ($trace[$i]['function']) { case 'get_class_methods': case 'get_class_vars':
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: