From 8623e9db8b1b774c6c7ec96832f34513521ea0fa Mon Sep 17 00:00:00 2001 From: Etienne Kneuss Date: Thu, 19 Mar 2009 03:01:37 +0000 Subject: [PATCH] MFH: Fix #47231 (offsetGet error using incorrect offset) --- NEWS | 1 + ext/spl/spl_array.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2b597d9279f..b3e815dbb21 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ PHP NEWS - Fixed bug #47320 ($php_errormsg out of scope in functions). (Dmitry) - Fixed bug #47265 (generating phar.phar fails because of safe_mode). (Greg) - Fixed bug #47243 (OCI8: Crash at shutdown on Windows) (Chris Jones/Oracle Corp.) +- Fixed bug #47231 (offsetGet error using incorrect offset). (Etienne) - Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno) - Fixed bug #47085 (rename() returns true even if the file in PHAR does not exist). (Greg) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 4ab0bba2c23..3621648a9d3 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -346,7 +346,7 @@ static zval **spl_array_get_dimension_ptr_ptr(int check_inherited, zval *object, zend_hash_index_find(ht, index, (void **) &retval); return retval; } else { - zend_error(E_NOTICE, "Undefined offset: %ld", Z_LVAL_P(offset)); + zend_error(E_NOTICE, "Undefined offset: %ld", index); return &EG(uninitialized_zval_ptr); } } else {