#39923 [Opn->Bgs]: Somewhat misleading notice message with type conversions

From: Date: Thu, 21 Dec 2006 14:35:32 +0000
Subject: #39923 [Opn->Bgs]: Somewhat misleading notice message with type conversions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106739@lists.php.net to get a copy of this message
ID: 39923 Updated by: tony2001@php.net Reported By: smlerman at gmail dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Windows PHP Version: 5.2.0 New Comment: IMG_* constants are defined in GD which is obviously not enabled in your installation. Previous Comments: ------------------------------------------------------------------------ [2006-12-21 14:33:21] smlerman at gmail dot com 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 this bug report at http://bugs.php.net/?id=39923&edit=1

« previous php.bugs (#106739) next »