Welcome Guest, Not a member yet? Register   Sign In
upload image - getimagezize read error
#1

[eluser]jayapalchandran[/eluser]
Hi, i tried to test the upload image of codeigniter by faking a jpeg file.
i created an empty file with a jpeg extension and uploaded it and i got the gollowing error.

A PHP Error was encountered
Severity: Notice
Message: getimagesize() [function.getimagesize]: Read error!
Filename: libraries/Upload.php

yet i got the error report in a variable stating

"The filetype you are attempting to upload is not allowed."

what if the users upload mistakenly an empty file and this error throws up... messing the appearance. ???

why cant it just say the error and not throw the image size error ???

This is a possible case where people could upload an empty file... aint it?

what you co developers suggest???
#2

[eluser]BrianDHall[/eluser]
Hm, I think you can use a try/catch block on your do
_upload() call - I believe that aught to catch the error thrown by getimagesize().
#3

[eluser]jayapalchandran[/eluser]
Now it is almost 7 months since ...
I updated if ($severity == E_STRICT || $severity == E_NOTICE)
line no 392 in Common.php after reading from some forum...

:-)

anyway, what would be the effects?




Theme © iAndrew 2016 - Forum software by © MyBB