diff --git a/src/InterventionBackend.php b/src/InterventionBackend.php index 7746e650..df79a048 100644 --- a/src/InterventionBackend.php +++ b/src/InterventionBackend.php @@ -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() ?? ''); } }