Skip to content

Commit 90360c8

Browse files
[ClassLoader] Fix storing not-found classes in APC cache
1 parent 37dd041 commit 90360c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/ClassLoader/ApcClassLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ public function loadClass($class)
122122
*/
123123
public function findFile($class)
124124
{
125-
if (false === $file = apcu_fetch($this->prefix.$class)) {
126-
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class));
125+
$file = apcu_fetch($this->prefix.$class, $success);
126+
127+
if (!$success) {
128+
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null);
127129
}
128130

129131
return $file;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy