Mute XCache error when trying to clear the opcode cache

From https://github.com/owncloud/core/issues/16287:

> This is caused by XCache at 8e59d4c64b/lib/private/util.php (L1276) where we are trying to reset the opcode cache with `XC_TYPE_PHP`.
> I suspect that while XCache is installed its opcode component is not used. Unfortunately, the XCache API is not really properly documented and thus I don't know what API we would have to call to check whether the `XC_TYPE_PHP` cache is populated. In fact, there is an [open XCache bug](http://xcache.lighttpd.net/ticket/176) since 7 years that discusses this problem and is likely to never get fixed since XCache is abandonware.

Fixes https://github.com/owncloud/core/issues/16287
This commit is contained in:
Lukas Reschke 2015-05-12 19:22:39 +02:00
parent d4eff55342
commit cbfdbf96d2

View file

@ -1335,7 +1335,7 @@ class OC_Util {
if (ini_get('xcache.admin.enable_auth')) {
OC_Log::write('core', 'XCache opcode cache will not be cleared because "xcache.admin.enable_auth" is enabled.', \OC_Log::WARN);
} else {
xcache_clear_cache(XC_TYPE_PHP, 0);
@xcache_clear_cache(XC_TYPE_PHP, 0);
}
}
// Opcache (PHP >= 5.5)