#34645 [Opn->Csd]: Calling ctype_digit() with integer value sets variable value to NULL
| From: | iliaa@php.net | Date: | Mon, 26 Sep 2005 15:19:18 +0000 |
| Subject: | #34645 [Opn->Csd]: Calling ctype_digit() with integer value sets variable value to NULL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85604@lists.php.net to get a copy of this message | ||
ID: 34645
Updated by: iliaa@php.net
Reported By: spheroid@php.net
-Status: Open
+Status: Closed
Bug Type: Variables related
Operating System: Debian GNU/Linux 2.4.27-2
PHP Version: 5.1.0RC1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-09-26 14:54:09] spheroid@php.net
Description:
------------
I know I shouldn't call ctype_digit() with integer values but strings.
However, the variable value shouldn't be set to NULL when its passed to
the function, right? :-)
Reproduce code:
---------------
<?php
$id = 394829384;
var_dump($id);
ctype_digit($id);
var_dump($id);
?>
Expected result:
----------------
int(394829384)
int(394829384)
Actual result:
--------------
int(394829384)
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34645&edit=1