cvs: ZendEngine2(PHP_5_2) / zend_execute.c /tests bug39304.phpt bug41919.phpt php-src NEWS
"Felipe Pena" <[email protected]> Mon, 06 Apr 2009 23:56:20 -0000
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvsfelipe1239062180@cvsserver> |
felipe Mon Apr 6 23:56:20 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/ZendEngine2 zend_execute.c
/ZendEngine2/tests bug39304.phpt bug41919.phpt
Log:
- Fixed bug #47903 ("@" operator does not work with string offsets (PHP_5_2 only!))
(MFH: #39018)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1460&r2=1.2027.2.547.2.1461&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1460 php-src/NEWS:1.2027.2.547.2.1461
--- php-src/NEWS:1.2027.2.547.2.1460 Mon Apr 6 11:49:33 2009
+++ php-src/NEWS Mon Apr 6 23:56:20 2009
@@ -8,6 +8,7 @@
- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
- Fixed segfault on invalid session.save_path. (Hannes)
+- Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
- Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
(Ilia, rainer dot jung at kippdata dot de)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.32&r2=1.716.2.12.2.33&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.32 ZendEngine2/zend_execute.c:1.716.2.12.2.33
--- ZendEngine2/zend_execute.c:1.716.2.12.2.32 Sun Feb 15 14:31:17 2009
+++ ZendEngine2/zend_execute.c Mon Apr 6 23:56:20 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.32 2009/02/15 14:31:17 iliaa Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.33 2009/04/06 23:56:20 felipe Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -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);
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug39304.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: ZendEngine2/tests/bug39304.phpt
diff -u ZendEngine2/tests/bug39304.phpt:1.1.2.1 ZendEngine2/tests/bug39304.phpt:1.1.2.2
--- ZendEngine2/tests/bug39304.phpt:1.1.2.1 Mon Oct 30 11:04:32 2006
+++ ZendEngine2/tests/bug39304.phpt Mon Apr 6 23:56:20 2009
@@ -6,4 +6,6 @@
list($a, $b) = $s[0];
?>
--EXPECTF--
-Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
+Notice: Uninitialized string offset: 0 in %s on line %d
+
+Fatal error: Cannot use string offset as an array in %sbug39304.php on line %d
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug41919.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u
Index: ZendEngine2/tests/bug41919.phpt
diff -u ZendEngine2/tests/bug41919.phpt:1.1.2.5 ZendEngine2/tests/bug41919.phpt:1.1.2.6
--- ZendEngine2/tests/bug41919.phpt:1.1.2.5 Thu May 29 07:33:03 2008
+++ ZendEngine2/tests/bug41919.phpt Mon Apr 6 23:56:20 2009
@@ -8,4 +8,6 @@
echo "ok\n";
?>
--EXPECTF--
+Notice: Uninitialized string offset: 3 in %s on line %d
+
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php