File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ public function __construct(
8282 }
8383
8484 $ versionFileName = $ this ->nextcloudDir . '/version.php ' ;
85+ // Invalidate version.php OPcache entry to assure file_exists() returns
86+ // false after files were removed while opcache.enable_file_override is set.
87+ if (function_exists ('opcache_invalidate ' )) {
88+ opcache_invalidate ($ versionFileName , true );
89+ }
8590 if (!file_exists ($ versionFileName )) {
8691 // fallback to version in config.php
8792 $ version = $ this ->getConfigOptionString ('version ' );
Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ public function __construct(
6666 }
6767
6868 $ versionFileName = $ this ->nextcloudDir . '/version.php ' ;
69+ // Invalidate version.php OPcache entry to assure file_exists() returns
70+ // false after files were removed while opcache.enable_file_override is set.
71+ if (function_exists ('opcache_invalidate ' )) {
72+ opcache_invalidate ($ versionFileName , true );
73+ }
6974 if (!file_exists ($ versionFileName )) {
7075 // fallback to version in config.php
7176 $ version = $ this ->getConfigOptionString ('version ' );
You can’t perform that action at this time.
0 commit comments