Improve cache reliability (#3421)
Reported and fixed by @interworks-morr: "Occasionally with certain IIS setups, the file will contain an out-of-date class name. This patch will verify the class name from the file before returning, and clear the cache if invalid."
This commit is contained in:
parent
7552464779
commit
0206a6811f
|
|
@ -192,8 +192,10 @@ class CodeParser
|
|||
|
||||
if (is_file($path)) {
|
||||
if ($className = $this->extractClassFromFile($path)) {
|
||||
$data['className'] = $className;
|
||||
return $data;
|
||||
if (class_exists($className)) {
|
||||
$data['className'] = $className;
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@unlink($path);
|
||||
|
|
|
|||
Loading…
Reference in New Issue