summaryrefslogtreecommitdiff
path: root/Zend/tests/bug52484_2.phpt
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-08-01 13:27:02 +0000
committerFelipe Pena <felipe@php.net>2010-08-01 13:27:02 +0000
commite914d906432ee4ac49c32076bc997b04a29bf51f (patch)
treed33f8ae4b9c70c30b86ed9e25e834b29ca737246 /Zend/tests/bug52484_2.phpt
parent938265115b8857a81db269b86db5b1f8b6c8d60c (diff)
downloadphp-git-e914d906432ee4ac49c32076bc997b04a29bf51f.tar.gz
- Fixed bug #52484 (__set() ignores setting properties with empty names)
Diffstat (limited to 'Zend/tests/bug52484_2.phpt')
-rw-r--r--Zend/tests/bug52484_2.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt
new file mode 100644
index 0000000000..1639c81029
--- /dev/null
+++ b/Zend/tests/bug52484_2.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #52484.2 (__set() ignores setting properties with empty names)
+--FILE--
+<?php
+
+class A {
+ function __set($prop, $val) {
+ $this->$prop = $val;
+ }
+}
+
+$a = new A();
+$prop = null;
+
+$a->$prop = 2;
+
+?>
+--EXPECTF--
+Fatal error: Cannot access empty property in %s on line %d