We only want to check extra optional args if the proto function is
variadic, not when we're adding extra variadic args.
- Core:
. Fixed bug #67878 (program_prefix not honoured in man pages). (Remi)
+ . Fixed bug #67938 (Segfault when extending interface method with variadic).
+ (Nikita)
- Fileinfo:
. Fixed bug #67731 (finfo::file() returns invalid mime type
- GMP:
. Fixed bug #67917 (Using GMP objects with overloaded operators can cause
- memory exhaustion). (Nikita Popov)
+ memory exhaustion). (Nikita)
- MySQLi:
. Fixed bug #67839 (mysqli does not handle 4-byte floats correctly). (Keyur)
--- /dev/null
+--TEST--
+Bug #67938: Segfault when extending interface method with variadic
+--FILE--
+<?php
+
+interface TestInterface {
+ public function foo();
+ public function bar(array $bar);
+}
+
+class Test implements TestInterface {
+ public function foo(...$args) {
+ echo __METHOD__, "\n";
+ }
+ public function bar(array $bar, ...$args) {
+ echo __METHOD__, "\n";
+ }
+}
+
+$obj = new Test;
+$obj->foo();
+$obj->bar([]);
+
+?>
+--EXPECT--
+Test::foo
+Test::bar
* go through all the parameters of the function and not just those present in the
* prototype. */
num_args = proto->common.num_args;
- if ((fe->common.fn_flags & ZEND_ACC_VARIADIC)
+ if ((proto->common.fn_flags & ZEND_ACC_VARIADIC)
&& fe->common.num_args > proto->common.num_args) {
num_args = fe->common.num_args;
}