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:
interworks-morr 2018-03-02 20:00:05 -06:00 committed by Luke Towers
parent 7552464779
commit 0206a6811f
1 changed files with 4 additions and 2 deletions

View File

@ -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);