Skip to content

Commit 428198b

Browse files
committed
Update error message wording per review feedback
Change "not compatible with" to "not the same as" since closures with different source locations aren't about compatibility.
1 parent 61d4a39 commit 428198b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3456,7 +3456,7 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic)
34563456
if (!variadic) {
34573457
efree(params);
34583458
}
3459-
_DO_THROW("Given Closure is not compatible with the reflected Closure");
3459+
_DO_THROW("Given Closure is not the same as the reflected Closure");
34603460
RETURN_THROWS();
34613461
}
34623462
}

ext/reflection/tests/gh21362.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ foreach ($closures as $closure) {
4646
?>
4747
--EXPECT--
4848
c1: foo=FOO, bar=BAR
49-
Given Closure is not compatible with the reflected Closure
50-
Given Closure is not compatible with the reflected Closure
49+
Given Closure is not the same as the reflected Closure
50+
Given Closure is not the same as the reflected Closure
5151
int(0)
5252
int(1)
5353
int(2)

0 commit comments

Comments
 (0)