diff options
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r-- | Zend/zend_closures.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 034b0d2d07..e7777c58cf 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -107,7 +107,11 @@ static zend_bool zend_valid_closure_binding( } if (is_fake_closure && scope != func->common.scope) { - zend_error(E_WARNING, "Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()"); + if (func->common.scope == NULL) { + zend_error(E_WARNING, "Cannot rebind scope of closure created from function"); + } else { + zend_error(E_WARNING, "Cannot rebind scope of closure created from method"); + } return 0; } |