Skip to content

Commit

Permalink
BypassFinals: add settings to cache hash [Closes #53]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 16, 2024
1 parent 91770cc commit 084396d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BypassFinals.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function modifyCode(string $code): string
private static function removeTokensCached(string $code): string
{
$wrapper = new NativeWrapper;
$hash = sha1($code);
$hash = sha1($code . implode(',', self::$tokens));
if (@$wrapper->stream_open(self::$cacheDir . '/' . $hash, 'r')) { // @ may not exist
flock($wrapper->handle, LOCK_SH);
if ($res = stream_get_contents($wrapper->handle)) {
Expand Down

0 comments on commit 084396d

Please sign in to comment.