Skip to content

Commit fdf4024

Browse files
authored
Merge pull request #31415 from knox/fix-opcache-permitted-path
Fix "Nextcloud is not allowed to use the OPcache API" warning
2 parents aec2e0f + f63eb42 commit fdf4024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/settings/lib/Controller/CheckSetupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ protected function getOpcacheSetupRecommendations(): array {
477477
// Check whether Nextcloud is allowed to use the OPcache API
478478
$isPermitted = true;
479479
$permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api');
480-
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, $permittedPath)) {
480+
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) {
481481
$isPermitted = false;
482482
}
483483

0 commit comments

Comments
 (0)