Skip to content

Commit 60b7d5f

Browse files
committed
Make it a deprecation instead
1 parent c5de589 commit 60b7d5f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Zend/tests/bug71428.3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class B { public function m(A $a = NULL, $n) { echo "B.m";} };
77
class C extends B { public function m(A $a , $n) { echo "C.m";} };
88
?>
99
--EXPECTF--
10-
Warning: Required parameter $n follows optional parameter in %s on line 3
10+
Deprecated: Required parameter $n follows optional parameter in %s on line %d
1111

1212
Fatal error: Declaration of C::m(A $a, $n) must be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4

Zend/tests/call_user_func_005.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var_dump(call_user_func(array('foo', 'teste')));
1818

1919
?>
2020
--EXPECTF--
21-
Warning: Required parameter $b follows optional parameter in %s on line %d
21+
Deprecated: Required parameter $b follows optional parameter in %s on line %d
2222
string(1) "x"
2323
array(1) {
2424
[0]=>

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5741,7 +5741,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
57415741
default_node.op_type = IS_UNUSED;
57425742
op_array->required_num_args = i + 1;
57435743
if (have_optional_param) {
5744-
zend_error(E_COMPILE_WARNING, "Required parameter $%s follows optional parameter",
5744+
zend_error(E_DEPRECATED, "Required parameter $%s follows optional parameter",
57455745
ZSTR_VAL(name));
57465746
}
57475747
}

ext/reflection/tests/bug62715.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ foreach ($r->getParameters() as $p) {
1717
}
1818
?>
1919
--EXPECTF--
20-
Warning: Required parameter $c follows optional parameter in %s on line %d
20+
Deprecated: Required parameter $c follows optional parameter in %s on line %d
2121
bool(true)
2222
bool(true)
2323
bool(false)

0 commit comments

Comments
 (0)