Project

General

Profile

Actions

Bug #102734

closed

opcache_reset() is not checked for existence in TYPO3\CMS\Core\Service\OpcodeCacheService

Added by Florian Konath 11 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2023-12-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In line 76 opcache_invalidate is checked for existence. It seems that my hosting provider does not provide those functions, but only opcache_get_status() is listed in disabled functions. So I get an error "Call to undefined function TYPO3\CMS\Core\Service\opcache_reset()". This can be avoided by checking opcache_reset() also for existence in line 76:

    return function_exists('opcache_reset') && function_exists('opcache_invalidate') && !(in_array('opcache_invalidate', $disabled, true) || in_array('opcache_reset', $disabled, true));
Actions

Also available in: Atom PDF