summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-06-17 13:20:18 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-06-17 13:20:18 +0000
commit7473ff4698dc72cc20b5953581e85680f915be5f (patch)
treefd3412ff6bc8f8595abd3ca883eb93817cacb938
parent03468f30794f36db7f846f90e8271e8ea99028b7 (diff)
downloadphp-git-7473ff4698dc72cc20b5953581e85680f915be5f.tar.gz
Fixed bug #24220 (range() didn't handle numeric strings correctly)
-rw-r--r--ext/standard/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 597daf2508..366d35eaf3 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1428,7 +1428,7 @@ PHP_FUNCTION(range)
/* allocate an array for return */
array_init(return_value);
- if (Z_TYPE_PP(zlow)==IS_STRING && Z_TYPE_PP(zhigh)==IS_STRING) {
+ if (Z_TYPE_PP(zlow) == IS_STRING && Z_TYPE_PP(zhigh) == IS_STRING && Z_STRLEN_PP(zlow) == 1 && Z_STRLEN_PP(zhigh) == 1) {
unsigned char low, high;
low = *((unsigned char *)Z_STRVAL_PP(zlow));
high = *((unsigned char *)Z_STRVAL_PP(zhigh));