]> granicus.if.org Git - php/commitdiff
Merge branch 'pull-request/994'
authorStanislav Malyshev <stas@php.net>
Sun, 1 Feb 2015 07:12:00 +0000 (23:12 -0800)
committerStanislav Malyshev <stas@php.net>
Sun, 1 Feb 2015 07:12:00 +0000 (23:12 -0800)
* pull-request/994:
  Added test and possible fix for https://bugs.php.net/bug.php?id=67068

1  2 
Zend/zend_closures.c

index 023e741360ac995fa0713c2b68ce6c72134b63ba,2ec83834c188c0450296554689e226c6608b5350..3478ee6816d33b44ba87cb263fed58ea47a24e91
@@@ -483,8 -449,9 +483,9 @@@ ZEND_API void zend_create_closure(zval 
  
        closure->func = *func;
        closure->func.common.prototype = NULL;
+       closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
  
 -      if ((scope == NULL) && (this_ptr != NULL)) {
 +      if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) {
                /* use dummy scope if we're binding an object without specifying a scope */
                /* maybe it would be better to create one for this purpose */
                scope = zend_ce_closure;