#32633 [NEW]: Warning message from imagecreatefromjpeg not suppressed when using @

From: Date: Fri, 08 Apr 2005 08:42:37 +0000
Subject: #32633 [NEW]: Warning message from imagecreatefromjpeg not suppressed when using @
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76521@lists.php.net to get a copy of this message
From: anders at apt dot no Operating system: Windows 2003 Advanced Server PHP version: 4.3.11 PHP Bug Type: GD related Bug description: Warning message from imagecreatefromjpeg not suppressed when using @ Description: ------------ I'm trying import a JPEG image (http://kunde.apt.no/aso/imagecreatefromjpeg/demo.jpg) to a resource using imagecreatefromjpeg. This function fails and even though I use @ infront of the function, it still generates an error warning 'Corrupt JPEG data: 203 extraneous bytes before marker 0xd9'. The image works fine in every other program I've tested it with. Some guy has found his own workaround: http://www-personal.umd.umich.edu/~dennismv/corruptjpeg.html Reproduce code: --------------- if ($im = @imagecreatefromjpeg('http://kunde.apt.no/aso/imagecreatefromjpeg/demo.jpg')) { echo 'Valid JPEG file'; imagedestroy($im); } else { echo 'Not a valid JPEG file'; } Expected result: ---------------- I expect the code to output 'Not a valid JPEG file', since the JPEG contains errors, and nothing else (since I've suppressed error messages with the @) Actual result: -------------- Not a valid JPEG fileCorrupt JPEG data: 203 extraneous bytes before marker 0xd9 -- Edit bug report at http://bugs.php.net/?id=32633&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32633&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32633&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32633&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32633&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32633&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32633&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32633&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32633&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32633&r=support Expected behavior: http://bugs.php.net/fix.php?id=32633&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32633&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32633&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32633&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32633&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32633&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32633&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32633&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32633&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32633&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32633&r=mysqlcfg

« previous php.bugs (#76521) next »