grav
grav copied to clipboard
Fatal error if opcache_compile_file is included in PHP disable_functions
I'm getting fatal errors when I try to run Grav sites on servers where the opcache_compile_file function is restricted using disable_functions in the PHP configuration. The error I'm getting is Call to undefined function Grav\Common\File\opcache_compile_file()
As a workaround, I patched system/src/Grav/Common/File/CompiledFile.php
to check for the existence of 'opcache_compile_file' instead of 'opcache_invalidate' in lines 91 and 161.