Uh oh!
There was an error while loading. Please reload this page.
fix the exif_read_data issue - #36420
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d9c5383 to
5b4f201CompareUh oh!
There was an error while loading. Please reload this page.
5b4f201 to
3fb06baCompareSigned-off-by: Simon L <szaimen@e.mail.de>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3fb06ba to
a704619Compare| // Revert right after reading the exif data. | ||
| $oldBufferSize = stream_set_chunk_size($fileDescriptor, 1); | ||
| $data = exif_read_data($fileDescriptor, 'ANY_TAG', true); | ||
| $data = @exif_read_data($fileDescriptor, 'ANY_TAG', true); |
There was a problem hiding this comment.
this was actually the only way how I could suppress the log message when testing with https://user-images.githubusercontent.com/12234510/205661916-3e7b14b4-6d4b-4dc2-9903-5265f95a2aee.png
szaimen
commented
Jan 28, 2023
/backport to stable25 |
simonspa
commented
Jan 29, 2023
What I find odd is that this seems to be only triggered by Android client uploads, but not when adding the exact same file via web interface. In one case, the error is thrown, in the other case EXIF data is retrieved just fine - so I guess there is still something else going on. Nevertheless, suppressing this error seems to make sense to me. |
artonge
left a comment
There was a problem hiding this comment.
Do you understand why the try/catch is not enough ?
Not a fan of silencing error like that.
Maybe changing } catch (\Exception $ex) { for } catch (\Throwable $ex) { and changing log level to info would be enough ?
come-nc
commented
Jan 30, 2023
https://www.php.net/manual/function.exif-read-data.php states:
You cannot try/catch those errors, that goes straight to log. |
szaimen
commented
Jan 30, 2023
Thanks @come-nc! So good to merge? |
Fix#34958