note 75196 added to function.mysql-real-escape-string
| From: | Piti at osu1 dot php dot net | Date: | Thu, 17 May 2007 15:22:48 +0000 |
| Subject: | note 75196 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126664@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.39.81.135
Probable Submitter: 131.215.7.198
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- https://master.php.net/note/edit/75196
Del: integrated -- https://master.php.net/note/delete/75196/integrated
Del: useless -- https://master.php.net/note/delete/75196/useless
Del: bad code -- https://master.php.net/note/delete/75196/bad+code
Del: spam -- https://master.php.net/note/delete/75196/spam
Del: non-english -- https://master.php.net/note/delete/75196/non-english
Del: in docs -- https://master.php.net/note/delete/75196/in+docs
Del: other reasons-- https://master.php.net/note/delete/75196
Reject -- https://master.php.net/note/reject/75196
Search -- https://master.php.net/manage/user-notes.php