Merge branch '3.1' into 3.2

This commit is contained in:
Daniel Hensby 2016-05-20 12:24:47 +01:00
commit 0c3d30e621
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -493,8 +493,7 @@ class SS_ClassManifest {
// files will have changed and TokenisedRegularExpression is quite
// slow. A combination of the file name and file contents hash are used,
// since just using the datetime lead to problems with upgrading.
$file = file_get_contents($pathname);
$key = preg_replace('/[^a-zA-Z0-9_]/', '_', $basename) . '_' . md5($file);
$key = preg_replace('/[^a-zA-Z0-9_]/', '_', $basename) . '_' . md5_file($pathname);
if ($data = $this->cache->load($key)) {
$valid = (
@ -513,7 +512,7 @@ class SS_ClassManifest {
}
if (!$classes) {
$tokens = token_get_all($file);
$tokens = token_get_all(file_get_contents($pathname));
$classes = self::get_namespaced_class_parser()->findAll($tokens);