|
Posted by lawrence k on 09/12/06 14:47
I've got an intermittent bug that is very hard to trace. On my site, if
I log into a new account and try to upload some images, something goes
wrong the first time. Everything works fine after the first time, but
the first time getimagesize fails to return a type, which is blank in
the following error messge. I'm going to check for weird path issues
that might be related to first login, but is anyone aware of situations
where getimagesize doesn't return a type?
list ($w, $h, $type, $attr) = getimagesize ($src_path);
if (($side = $w) > $h) $side = $h;
$dst = imagecreatetruecolor (PHOTO_SIDEX, PHOTO_SIDEY);
if ($type == 1 || $type == 2 || $type == 3 || $type == 6) {
/// lots of code goes here
} else {
$controller->error("In makeCroppedPhoto the type of image was '$type'
for image '$src_path' which is not an allowed type. All that is allowed
is gif(1), jpg(2), png(3) and bmp(6)."); }
Navigation:
[Reply to this message]
|