From a49e04477f88d75b87f9b992c58261fd1f619513 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 24 Jul 2006 07:43:49 +0000 Subject: [PATCH] Test for bug #38146 (Cannot use array returned from foo::__get('bar') in write context) --- NEWS | 2 ++ Zend/tests/bug38146.phpt | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 Zend/tests/bug38146.phpt diff --git a/NEWS b/NEWS index 37491351e4..e9ccf33b1f 100644 --- a/NEWS +++ b/NEWS @@ -104,6 +104,8 @@ PHP NEWS - Fixed handling of extremely long paths inside tempnam() function. (Ilia) - Fixed bug #38183 (disable_classes=Foobar causes disabled class to be called Foo). (Jani) +- Fixed bug #38146 (Cannot use array returned from foo::__get('bar') in write + context). (Dmitry) - Fixed bug #38125 (undefined reference to spl_dual_it_free_storage). (Marcus) - Fixed bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the actual length). (Tony) diff --git a/Zend/tests/bug38146.phpt b/Zend/tests/bug38146.phpt new file mode 100755 index 0000000000..e321e11c8c --- /dev/null +++ b/Zend/tests/bug38146.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #38146 (Cannot use array returned from foo::__get('bar') in write context) +--FILE-- +"bar","bar"=>"foo"); + return $f; + } +} + +$f = new foo(); +foreach($f->bar as $key => $value) { + print "$key => $value\n"; +} +?> +--EXPECT-- +foo => bar +bar => foo -- 2.40.0