filesize(): stat failed in Filesystem/Filesystem.php because there are no checks for a file prior to consuming #42487
Unanswered
brantmessenger
asked this question in
Q&A
Replies: 1 comment
-
Should a solution like this check to see if a file exists before consuming said file? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is happening to me in a recurring fashion. Centos 7, Laravel Framework 8, Apache HTTPD.
I've searched to see if anyone else might be having this issue. Several have this same issue, and it has existed for a while.
https://duckduckgo.com/?q=laravel+filesize()%3A+stat+failed&atb=v319-1&ia=web
framework/src/Illuminate/Filesystem/Filesystem.php
Line 77 in 127a9ca
I'm suggesting a check in the size method or within the try/catch block to determine if the file exists. If it doesn't exist throw an exception or return zero. Wondering what your thoughts are about this approach and could it be fixed?
Beta Was this translation helpful? Give feedback.
All reactions