summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-07-21 12:13:16 +0000
committerZeev Suraski <zeev@php.net>2003-07-21 12:13:16 +0000
commit7e72d8e826d790713b990b7f34d85320633da4e2 (patch)
tree51c22edf72e1665b55c00b59846ecf8bdb7fe52c /tests
parent9bbf5577dd828302ab9717f383eaf574eb798630 (diff)
downloadphp-git-7e72d8e826d790713b990b7f34d85320633da4e2.tar.gz
Fix bug #24499
Diffstat (limited to 'tests')
-rwxr-xr-xtests/lang/bug24499.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lang/bug24499.phpt b/tests/lang/bug24499.phpt
new file mode 100755
index 0000000000..6ce56dbad7
--- /dev/null
+++ b/tests/lang/bug24499.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #24499 (bogus handling of a public property as a private one)
+--FILE--
+<?php
+class Id {
+ private $id="priv";
+
+ public function tester($obj)
+ {
+ $obj->id = "bar";
+ }
+}
+
+$id = new Id();
+@$obj->foo = "bar";
+$id->tester($obj);
+print_r($obj);
+?>
+--EXPECT--
+stdClass Object
+(
+ [foo] => bar
+ [id] => bar
+)