Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix OC_Image: Prevent E_WARNING from getimagesize*
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr authored and szaimen committed Mar 16, 2023
commit 4a2accaa27f6bb0dd28ac6003f1fe90334757323
4 changes: 2 additions & 2 deletions lib/private/legacy/OC_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ private function checkImageMemory($width, $height) {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageSize($path) {
$size = getimagesize($path);
$size = @getimagesize($path);
if (!$size) {
return true;
}
Expand All @@ -619,7 +619,7 @@ private function checkImageSize($path) {
* @return bool true if allocating is allowed, false otherwise
*/
private function checkImageDataSize($data) {
$size = getimagesizefromstring($data);
$size = @getimagesizefromstring($data);
if (!$size) {
return true;
}
Expand Down