As already suggest I like get logo size with
getimagesize() function, search in php.net size the
documentation and note:
"Nota: The getimagesize() function does not require
the GD image library."
Comment By: Tomas Kuliavas (tokul) say me in
squirrelmail-Patches-1307628 that "getimagesize()
function call ads dependency on PHP gd extension." this
is not correct.
Anyway I use file_exists() function before call
getimagesize().
Logged In: YES
user_id=225877
OK, my mistake. I thought that function listed in GD section
is part of GD extension.
Your patch tests for imap_open() function and does not
handle getimagesize() errors. "If accessing the filename
image is impossible, or if it isn't a valid picture,
getimagesize() will return FALSE and generate an error of
level E_WARNING."
Logged In: YES
user_id=524021
Sorry for my mistake. I mean:
if (function_exists('getimagesize'))
instead
if (function_exists('imap_open'))
...a paste and copy error ;-)
Anyway you get error only if permission on file is not
readable or the image is not really image... You can
also check some extensions with something like:
if (file_exists($org_logo) && is_readable($org_logo))
$extensions = array('jpg','gif','png');
$filename_array = explode('.',$org_logo);
if (in_array(end($filename_array),$extensions))
I will submit my updated patch
Logged In: YES
user_id=524021
Originator: YES
Updated patch
File Added: login.php.diff
Patch for Auto determine $org_logo_width and $org_logo_height and more
Logged In: YES
user_id=1997852
Originator: NO
If you do not want to apply this patch, please consider check
if $org_logo exists and are readable
file_exists($org_logo) && is_readable($org_logo)