diff -u b/core/includes/install.inc b/core/includes/install.inc --- b/core/includes/install.inc +++ b/core/includes/install.inc @@ -171,22 +171,27 @@ * Filepath of PHP file to be flushed. */ function drupal_clear_opcode_cache($filepath) { + // Do nothing if the file does not exist or it stat fails. + clearstatcache(TRUE, $filepath); + if (!file_exists($filepath) || !@stat($filepath)) { + return; + } + try { - // Use @ error suppression. if (function_exists('opcache_invalidate')) { - @opcache_invalidate($filepath); + opcache_invalidate($filepath); } if (function_exists('apc_delete_file')) { - @apc_delete_file($filepath); + apc_delete_file($filepath); } if (function_exists('wincache_refresh_if_changed')) { - @wincache_refresh_if_changed(array($filepath)); + wincache_refresh_if_changed(array($filepath)); } if (function_exists('xcache_clear_cache')) { - @xcache_clear_cache(XC_TYPE_PHP); + xcache_clear_cache(XC_TYPE_PHP); } if (function_exists('eaccelerator_clear')) { - @eaccelerator_clear(); + eaccelerator_clear(); } } catch (Exception $e) {