note 107101 added to function.mysql-real-escape-string
| From: | ovoznyak at gmail dot com | Date: | Sat, 07 Jan 2012 11:25:43 +0000 |
| Subject: | note 107101 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185446@lists.php.net to get a copy of this message | ||
Function safe_string_escape($str) above is not properly working when $str is numeric (not string).
For example, when call them as safe_string_escape((int) 12), it returns empty string. At the same
time mysql_real_escape_string() returns 12.
So, it is safe to add $str = (string) $str; in the begin of function.
----
Server IP: 69.147.83.197
Probable Submitter: 178.95.55.33
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- https://master.php.net/note/edit/107101
Del: integrated -- https://master.php.net/note/delete/107101/integrated
Del: useless -- https://master.php.net/note/delete/107101/useless
Del: bad code -- https://master.php.net/note/delete/107101/bad+code
Del: spam -- https://master.php.net/note/delete/107101/spam
Del: non-english -- https://master.php.net/note/delete/107101/non-english
Del: in docs -- https://master.php.net/note/delete/107101/in+docs
Del: other reasons-- https://master.php.net/note/delete/107101
Reject -- https://master.php.net/note/reject/107101
Search -- https://master.php.net/manage/user-notes.php