Skip to content

Commit 360d690

Browse files
authored
Fix throw missing file error (#6)
* Update AppleSafariPinGenerator.php Fix throwing error for non-existent file when the conversion didn't work, instead of the thrown error * Change error suppression to if statement
1 parent 6f33689 commit 360d690

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AppleSafariPinGenerator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public function tempFile(callable $callback, string $prefix = 'favicon-tmp')
6868
return $callback($tempSource, $tempTarget);
6969
} finally {
7070
\unlink($tempSource);
71-
\unlink($tempTarget);
71+
if (\is_file($tempTarget) {
72+
\unlink($tempTarget);
73+
}
7274
}
7375
}
7476

0 commit comments

Comments
 (0)