#36692 [Opn]: error in documentation
| From: | nobody at example dot com | Date: | Sat, 11 Mar 2006 00:28:08 +0000 |
| Subject: | #36692 [Opn]: error in documentation | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969372324@lists.php.net to get a copy of this message | ||
ID: 36692
User updated by: nobody at example dot com
Reported By: nobody at example dot com
Status: Open
Bug Type: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
New Comment:
is_int(), not int().
Previous Comments:
------------------------------------------------------------------------
[2006-03-11 01:26:04] nobody at example dot com
Description:
------------
On the documentation for mysql_real_escape_string at
http://us2.php.net/manual/en/function.mysql-real-escape-string.php
:
// Quote if not integer
if (!is_numeric($value)) {
$value = "'" . mysql_real_escape_string($value) . "'";
}
This is blatantly incorrect. is_numeric() does *not* test whether
something is an integer. This should probably be int() or
ctype_digit() instead.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36692&edit=1