#20548 [NEW]: Decrement ("$x[$y]--") doesn't work on uninitiated variable
| From: | prgallier at yahoo dot com | Date: | Thu, 21 Nov 2002 18:42:11 +0000 |
| Subject: | #20548 [NEW]: Decrement ("$x[$y]--") doesn't work on uninitiated variable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-25437@lists.php.net to get a copy of this message | ||
From: prgallier@yahoo.com
Operating system: Linux 2.4
PHP version: 4.3.0RC1
PHP Bug Type: Math related
Bug description: Decrement ("$x[$y]--") doesn't work on uninitiated variable
The following:
$score[$num]--;
does not affect $score[$num] if $score[$num] is uninitiated.
Using $score[$num]++ does work, however.
This is inconsistent.
--
Edit bug report at http://bugs.php.net/?id=20548&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20548&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20548&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20548&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20548&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20548&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20548&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20548&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20548&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20548&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20548&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20548&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20548&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20548&r=isapi