We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab27cf5 + 9064b49 commit b90978fCopy full SHA for b90978f
src/phpFastCache/Util/Directory.php
@@ -132,7 +132,11 @@ public static function getAbsolutePath($path)
132
$absolutes[] = $part;
133
}
134
135
- $__FILE__ = __FILE__; // allows to dereference char
+
136
+ /**
137
+ * Allows to dereference char
138
+ */
139
+ $__FILE__ = preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc.
140
$prefix = $__FILE__[0] === DIRECTORY_SEPARATOR ? DIRECTORY_SEPARATOR : '';
141
return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes);
142
0 commit comments