diff options
| author | Stanislav Malyshev <stas@php.net> | 2011-12-22 03:22:42 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2011-12-22 03:22:42 +0000 |
| commit | 327a5828cd8341846c4f4b7231124541f16660cd (patch) | |
| tree | 91f6f7620cbd95e56df2ade7009595a60b30c917 | |
| parent | d1be77edfb72df9481dac662aca770f08c90ec92 (diff) | |
| download | php-git-327a5828cd8341846c4f4b7231124541f16660cd.tar.gz | |
Fix warning on non-numeric offsets
| -rw-r--r-- | Zend/tests/empty_str_offset.phpt | 4 | ||||
| -rw-r--r-- | Zend/tests/isset_str_offset.phpt | 4 | ||||
| -rw-r--r-- | Zend/zend_vm_def.h | 2 | ||||
| -rw-r--r-- | Zend/zend_vm_execute.h | 24 |
4 files changed, 15 insertions, 19 deletions
diff --git a/Zend/tests/empty_str_offset.phpt b/Zend/tests/empty_str_offset.phpt index 09e8d010ff..486c052dc4 100644 --- a/Zend/tests/empty_str_offset.phpt +++ b/Zend/tests/empty_str_offset.phpt @@ -64,9 +64,7 @@ bool(false) bool(true) bool(true) bool(true) - -Notice: A non well formed numeric value encountered in %s line %d -bool(false) +bool(true) - bool --- bool(false) bool(false) diff --git a/Zend/tests/isset_str_offset.phpt b/Zend/tests/isset_str_offset.phpt index 66b025ccec..7a9164a381 100644 --- a/Zend/tests/isset_str_offset.phpt +++ b/Zend/tests/isset_str_offset.phpt @@ -64,9 +64,7 @@ bool(true) bool(true) bool(false) bool(false) - -Notice: A non well formed numeric value encountered in %s line %d -bool(true) +bool(false) - bool --- bool(true) bool(true) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 2c886bf24b..68e49ff670 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4509,7 +4509,7 @@ ZEND_VM_C_LABEL(num_index_prop): if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 8a0ef5b04b..2b55a6016c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -14037,7 +14037,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -15950,7 +15950,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -18221,7 +18221,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -21142,7 +21142,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -22476,7 +22476,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -23633,7 +23633,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -24790,7 +24790,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -26213,7 +26213,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -29528,7 +29528,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -31315,7 +31315,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -33459,7 +33459,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); @@ -36117,7 +36117,7 @@ num_index_prop: if (Z_TYPE_P(offset) != IS_LONG) { if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */ - && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, -1))) { + && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) { ZVAL_COPY_VALUE(&tmp, offset); zval_copy_ctor(&tmp); convert_to_long(&tmp); |
