Skip to content

Commit b1bfaf6

Browse files
authored
Merge pull request #383 from bukowskiadam/final
#381 Fixed getAbsolutePath
2 parents 9b4c90c + 55bbe03 commit b1bfaf6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/phpFastCache/Util/Directory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ public static function getAbsolutePath($path)
132132
$absolutes[] = $part;
133133
}
134134
}
135-
return implode(DIRECTORY_SEPARATOR, $absolutes);
135+
$__FILE__ = __FILE__; // allows to dereference char
136+
$prefix = $__FILE__[0] === DIRECTORY_SEPARATOR ? DIRECTORY_SEPARATOR : '';
137+
return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes);
136138
}
137139
}

0 commit comments

Comments
 (0)