stas                                     Thu, 22 Dec 2011 03:22:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321313

Log:
Fix warning on non-numeric offsets

Changed paths:
    U   php/php-src/branches/PHP_5_4/Zend/tests/empty_str_offset.phpt
    U   php/php-src/branches/PHP_5_4/Zend/tests/isset_str_offset.phpt
    U   php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h
    U   php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h
    U   php/php-src/trunk/Zend/tests/empty_str_offset.phpt
    U   php/php-src/trunk/Zend/tests/isset_str_offset.phpt
    U   php/php-src/trunk/Zend/zend_vm_def.h
    U   php/php-src/trunk/Zend/zend_vm_execute.h

Modified: php/php-src/branches/PHP_5_4/Zend/tests/empty_str_offset.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/tests/empty_str_offset.phpt	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/branches/PHP_5_4/Zend/tests/empty_str_offset.phpt	2011-12-22 03:22:42 UTC (rev 321313)
@@ -64,9 +64,7 @@
 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)

Modified: php/php-src/branches/PHP_5_4/Zend/tests/isset_str_offset.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/tests/isset_str_offset.phpt	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/branches/PHP_5_4/Zend/tests/isset_str_offset.phpt	2011-12-22 03:22:42 UTC (rev 321313)
@@ -64,9 +64,7 @@
 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)

Modified: php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h	2011-12-22 03:22:42 UTC (rev 321313)
@@ -4509,7 +4509,7 @@
 		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);

Modified: php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h	2011-12-22 03:22:42 UTC (rev 321313)
@@ -14037,7 +14037,7 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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);

Modified: php/php-src/trunk/Zend/tests/empty_str_offset.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/empty_str_offset.phpt	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/trunk/Zend/tests/empty_str_offset.phpt	2011-12-22 03:22:42 UTC (rev 321313)
@@ -64,9 +64,7 @@
 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)

Modified: php/php-src/trunk/Zend/tests/isset_str_offset.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/isset_str_offset.phpt	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/trunk/Zend/tests/isset_str_offset.phpt	2011-12-22 03:22:42 UTC (rev 321313)
@@ -64,9 +64,7 @@
 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)

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===================================================================
--- php/php-src/trunk/Zend/zend_vm_def.h	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/trunk/Zend/zend_vm_def.h	2011-12-22 03:22:42 UTC (rev 321313)
@@ -4509,7 +4509,7 @@
 		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);

Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===================================================================
--- php/php-src/trunk/Zend/zend_vm_execute.h	2011-12-22 02:19:40 UTC (rev 321312)
+++ php/php-src/trunk/Zend/zend_vm_execute.h	2011-12-22 03:22:42 UTC (rev 321313)
@@ -14037,7 +14037,7 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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);
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to