[PATCH] Fix for 27097

From: Date: Fri, 30 Jan 2004 16:15:49 +0000
Subject: [PATCH] Fix for 27097
Groups: php.internals 
Request: Send a blank email to internals+get-7424@lists.php.net to get a copy of this message
Hi! There is an inconsistency in the Zend API (See #27097) so integers are reported as "integer" by zend_zval_type_name but "long" by zend_parse_arg_impl causing confusion for users not knowing C, the attached patch fixes it. Stefan -- Regards, Stefan Walk <swalk@prp.physik.tu-darmstadt.de>

Index: zend_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.237 diff -u -r1.237 zend_API.c --- zend_API.c 23 Jan 2004 22:04:42 -0000 1.237 +++ zend_API.c 30 Jan 2004 16:11:10 -0000 @@ -236,7 +236,7 @@ int type; if ((type = is_numeric_string(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), p, &d, 0)) == 0) { - return "long"; + return "integer"; } else if (type == IS_DOUBLE) { *p = (long) d; } @@ -255,7 +255,7 @@ case IS_OBJECT: case IS_RESOURCE: default: - return "long"; + return "integer"; } } break;
« previous php.internals (#7424) next »