php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54267
Patch svn-r278340-diff revision 2011-03-16 04:25 UTC by jbarbuto at gmail dot com

Patch svn-r278340-diff for Strings related Bug #54267

Patch version 2011-03-16 04:25 UTC

Return to Bug #54267 | Download this patch
Patch Revisions:

Developer: jbarbuto@gmail.com

Index: Zend/zend_execute.c
===================================================================
--- Zend/zend_execute.c	(revision 278339)
+++ Zend/zend_execute.c	(revision 278340)
@@ -183,7 +183,6 @@
 		if (T->str_offset.str->type != IS_STRING
 			|| ((int)T->str_offset.offset < 0)
 			|| (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) {
-			zend_error(E_NOTICE, "Uninitialized string offset:  %d", T->str_offset.offset);
 			ptr->value.str.val = STR_EMPTY_ALLOC();
 			ptr->value.str.len = 0;
 		} else {
@@ -1133,6 +1132,9 @@
 						break;
 				}
 				if (result) {
+					if (Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) {
+						zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
+					}
 					container = *container_ptr;
 					result->str_offset.str = container;
 					PZVAL_LOCK(container);

Property changes on: Zend/zend_execute.c
___________________________________________________________________
Modified: cvs2svn:cvs-rev
   - 1.716.2.12.2.32
   + 1.716.2.12.2.33

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC