summaryrefslogtreecommitdiff
path: root/Zend/tests/bug78770.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-14 10:22:42 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-14 10:24:06 +0200
commitbefe10fd21c82e82d8621558b7998424ab6d2c6d (patch)
tree36f9fb1e5e55a544df65cb47edfc4a3a16d37d42 /Zend/tests/bug78770.phpt
parentf83368c6d960329c17df764947e793a863379582 (diff)
downloadphp-git-befe10fd21c82e82d8621558b7998424ab6d2c6d.tar.gz
Fix bug #78770
Refactor the zend_is_callable implementation to check callability at a particular frame (this is an implementation detail for now, but could be exposed in the API if useful). Pick the first parent user frame as the one to check.
Diffstat (limited to 'Zend/tests/bug78770.phpt')
-rw-r--r--Zend/tests/bug78770.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/bug78770.phpt b/Zend/tests/bug78770.phpt
new file mode 100644
index 0000000000..b1cf783b95
--- /dev/null
+++ b/Zend/tests/bug78770.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #78770: Incorrect callability check inside internal methods
+--SKIPIF--
+<?php
+if (!extension_loaded("intl")) die("skip requires intl");
+?>
+--FILE--
+<?php
+
+class Test {
+ public function method() {
+ IntlChar::enumCharTypes([$this, 'privateMethod']);
+ IntlChar::enumCharTypes('self::privateMethod');
+ }
+
+ private function privateMethod($start, $end, $name) {
+ }
+}
+
+(new Test)->method();
+
+?>
+===DONE===
+--EXPECT--
+===DONE===