summaryrefslogtreecommitdiff
path: root/Zend/tests/bug77339.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-12-24 13:22:43 +0300
committerDmitry Stogov <dmitry@zend.com>2018-12-24 13:22:43 +0300
commit7e597f48e9fda982e930e4f617d2b2d98d8878a5 (patch)
tree09535ca6c59eda34308e80721122f8857b77abed /Zend/tests/bug77339.phpt
parent64de5bc224584e1da08c5c2bdf76db72ccbaaaab (diff)
downloadphp-git-7e597f48e9fda982e930e4f617d2b2d98d8878a5.tar.gz
Fixed bug #77339 (__callStatic may get incorrect arguments)
Diffstat (limited to 'Zend/tests/bug77339.phpt')
-rw-r--r--Zend/tests/bug77339.phpt33
1 files changed, 33 insertions, 0 deletions
diff --git a/Zend/tests/bug77339.phpt b/Zend/tests/bug77339.phpt
new file mode 100644
index 0000000000..2e749bcd5a
--- /dev/null
+++ b/Zend/tests/bug77339.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #77339 (__callStatic may get incorrect arguments)
+--FILE--
+<?php
+class Foo
+{
+ static function __callStatic($name, $arguments) {
+ if ($name === 'get') {
+ if (!isset($arguments[0])) {
+ var_dump(['getSomeWhat']);
+ var_dump($arguments);
+ exit;
+ }
+ }
+ echo "OK\n";
+ }
+
+ protected function get ($key) {
+ echo "BUG!!!\n";
+ }
+}
+
+class Bar
+{
+ static function __callStatic($name, $arguments) {
+ echo Foo::get('getSomeWhat');
+ }
+}
+
+Bar::someUndefinedStaticFunction();
+?>
+--EXPECT--
+OK