Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit a2233f5

Browse files
[Debug] workaround opcache bug mutating "$this" !?!
1 parent 2016b3e commit a2233f5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

DebugClassLoader.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ public function loadClass($class)
138138
try {
139139
if ($this->isFinder && !isset($this->loaded[$class])) {
140140
$this->loaded[$class] = true;
141-
if ($file = $this->classLoader[0]->findFile($class) ?: false) {
142-
$wasCached = \function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file);
143-
141+
if (!$file = $this->classLoader[0]->findFile($class) ?: false) {
142+
// no-op
143+
} elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) {
144144
require $file;
145145

146-
if ($wasCached) {
147-
return;
148-
}
146+
return;
147+
} else {
148+
require $file;
149149
}
150150
} else {
151151
\call_user_func($this->classLoader, $class);

0 commit comments

Comments
 (0)