Upgrade to 3.1.3

This commit is contained in:
Bastian Allgeier
2019-04-23 16:13:26 +02:00
parent eb29ef6d6c
commit 066913cb6e
53 changed files with 606 additions and 261 deletions

View File

@@ -264,6 +264,21 @@ class F
return pathinfo($name, PATHINFO_BASENAME);
}
/**
* Invalidate opcode cache for file.
*
* @param string $file The path of the file
* @return boolean
*/
public static function invalidateOpcodeCache(string $file): bool
{
if (function_exists('opcache_invalidate') && strlen(ini_get('opcache.restrict_api')) === 0) {
return opcache_invalidate($file, true);
} else {
return false;
}
}
/**
* Checks if a file is of a certain type
*