php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34645 Calling ctype_digit() with integer value sets variable value to NULL
Submitted: 2005-09-26 14:54 UTC Modified: 2005-09-26 17:19 UTC
From: spheroid@php.net Assigned:
Status: Closed Package: Variables related
PHP Version: 5.1.0RC1 OS: Debian GNU/Linux 2.4.27-2
Private report: No CVE-ID: None
 [2005-09-26 14:54 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-26 17:19 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC