Skip to content

Commit

Permalink
silverstripe requires PHP8 so we can use str_starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdruid committed Dec 4, 2024
1 parent 7e7c5cb commit 16006f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InterventionBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ public function __destruct()
$this->image->destroy();
}
// remove our temp file if it exists
if ((strpos(basename($this->getTempPath()), 'interventionimage_') === 0) && file_exists($this->getTempPath() ?? '')) {
if (str_starts_with(basename($this->getTempPath()), 'interventionimage_') && file_exists($this->getTempPath() ?? '')) {
unlink($this->getTempPath() ?? '');
}
}
Expand Down

0 comments on commit 16006f5

Please sign in to comment.