diff options
author | matthew <matthew> | 2007-03-27 21:44:27 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-03-27 21:44:27 +0000 |
commit | 09045bc351dfcd3ea6e73d44ac91c8d47268a3c2 (patch) | |
tree | 6f450837c9b244d745fe07ca33aed1d9ce68e5f6 | |
parent | bf78149c0a2ec699d40db5afd55a5b971812cae9 (diff) |
Aha! Thanks, Cees Hek.
http://www.imagemagick.org/pipermail/magick-bugs/2005-August/002170.html
-rwxr-xr-x | web/index.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/index.cgi b/web/index.cgi index 80c117302..0b55a0136 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.102 2007-03-27 21:33:36 matthew Exp $ +# $Id: index.cgi,v 1.103 2007-03-27 21:44:27 matthew Exp $ # TODO # Nothing is done about the update checkboxes - not stored anywhere on anything! @@ -221,11 +221,11 @@ sub submit_problem { if ($fh) { try { $image = Image::Magick->new; - my $err = $image->Read(file=>$fh); + my $err = $image->Read(file => \*$fh); # Mustn't be stringified close $fh; - throw Error::Simple('read failed') if "$err"; - $err = $image->Scale(geometry=>"250x250>"); - throw Error::Simple('resize failed') if "$err"; + throw Error::Simple("read failed: $err") if "$err"; + $err = $image->Scale(geometry => "250x250>"); + throw Error::Simple("resize failed: $err") if "$err"; my @blobs = $image->ImageToBlob(); undef $image; $image = $blobs[0]; |