Skip to content

Commit dd49c45

Browse files
committed
do not display the buffer_size info if the size is already set to a certain threshold
Signed-off-by: szaimen <[email protected]>
1 parent 0c14ee6 commit dd49c45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/settings/lib/Controller/CheckSetupController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,12 @@ protected function getOpcacheSetupRecommendations(): array {
524524
}
525525

526526
if (
527-
empty($status['interned_strings_usage']['free_memory']) ||
528-
($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
527+
// Do not display this error if the buffer_size is already set to a firth of the total opcache memory consumption or higher
528+
(!$status['interned_strings_usage']['buffer_size'] >= (($this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4) * 1024 * 1024)) &&
529+
(
530+
empty($status['interned_strings_usage']['free_memory']) ||
531+
($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
532+
)
529533
) {
530534
$recommendations[] = $this->l10n->t('The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply <code>opcache.interned_strings_buffer</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]);
531535
}

0 commit comments

Comments
 (0)