note 75196 deleted from function.mysql-real-escape-string by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Mar 2009 15:05:44 +0000 |
| Subject: | note 75196 deleted from function.mysql-real-escape-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151923@lists.php.net to get a copy of this message | ||
Note Submitter: Piti
----
The function quote_smart provided will fail on the following kind of string
2E345668
The is_numeric will return true and will treat it as number. When it's passed to mysql,
mysql'll think that it's a double and will try to parse it. But this number is much larger
than the maximum allowed double in mysql. Thus, mysql will complain.
The fix is to add is_finite check when checking if the argument is a number.