Skip to content

Commit 227a095

Browse files
authored
Merge pull request #31437 from nextcloud/backport/31415/stable23
[stable23] Fix "Nextcloud is not allowed to use the OPcache API" warning
2 parents 3686021 + 4910724 commit 227a095

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
@@ -482,7 +482,7 @@ protected function getOpcacheSetupRecommendations(): array {
482482
// Check whether Nextcloud is allowed to use the OPcache API
483483
$isPermitted = true;
484484
$permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api');
485-
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, $permittedPath)) {
485+
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) {
486486
$isPermitted = false;
487487
}
488488

0 commit comments

Comments
 (0)