#39923 [NEW]: Somewhat misleading notice message with type conversions
| From: | smlerman at gmail dot com | Date: | Thu, 21 Dec 2006 14:33:21 +0000 |
| Subject: | #39923 [NEW]: Somewhat misleading notice message with type conversions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-106738@lists.php.net to get a copy of this message | ||
From: smlerman at gmail dot com
Operating system: Windows
PHP version: 5.2.0
PHP Bug Type: GD related
Bug description: Somewhat misleading notice message with type conversions
Description:
------------
The constants IMG_PNG, IMG_JPG, and IMG_GIF are reported as undefined.
IMAGETYPE_PNG, IMAGETYPE_JPEG, and IMAGETYPE_GIF all work fine. If the
IMG_ constants were removed intentionally in favor of the IMAGETYPE_
constants, this is just a documentation issue.
Reproduce code:
---------------
<?php
echo IMG_PNG . "\n";
echo IMG_JPG . "\n";
echo IMG_GIF . "\n";
echo IMAGETYPE_PNG . "\n";
echo IMAGETYPE_JPEG . "\n";
echo IMAGETYPE_GIF . "\n";
?>
Expected result:
----------------
3
2
1
3
2
1
Actual result:
--------------
Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in test.php
on line 3
IMG_PNG
Notice: Use of undefined constant IMG_JPG - assumed 'IMG_JPG' in test.php
on line 4
IMG_JPG
Notice: Use of undefined constant IMG_GIF - assumed 'IMG_GIF' in test.php
on line 5
IMG_GIF
3
2
1
--
Edit bug report at http://bugs.php.net/?id=39923&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39923&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39923&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39923&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39923&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39923&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39923&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39923&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39923&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39923&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39923&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39923&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39923&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39923&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39923&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39923&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39923&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39923&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39923&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39923&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39923&r=mysqlcfg