Skip to content

Commit

Permalink
selfie (bugfix): throw exception if image can't be renamed (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
andi34 authored Jan 2, 2025
1 parent 23cdf49 commit 4c830bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/selfie.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
throw new \Exception('Image doesn\'t exist:' . $tmp);
}

if (rename($tmp, $filename_tmp)) {
if (!rename($tmp, $filename_tmp)) {
throw new \Exception('Failed to rename image!');
}

Expand Down

0 comments on commit 4c830bb

Please sign in to comment.