PHP number auto-converting doesn't work for negative #'s without a leading digit
| From: | Justin Patrin | Date: | Tue, 08 Feb 2005 23:15:13 +0000 |
| Subject: | PHP number auto-converting doesn't work for negative #'s without a leading digit | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-36078@lists.php.net to get a copy of this message | ||
Just thought you all might like to know:
http://bugs.php.net/bug.php?id=31889
This is a pretty simple bug which affects scripts which assume PHP
will convert a string to a number automatically. It will except for
strings such as: "-.55" with no leading digit. Using (float) before
the string works fine, but the auto-conversion doesn't. See the second
reproduce code in the bug for an example (forget the first one, I
screwed that one up :-/ ).
--
Justin Patrin