@@ -564,12 +564,12 @@ PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */
564
564
* if the result won't be used. (https://github.com/php/php-src/issues/8044) */
565
565
zend_object * zobj = Z_OBJ_P (struc );
566
566
uint32_t * guard = zend_get_recursion_guard (zobj );
567
- if (ZEND_GUARD_OR_GC_IS_RECURSIVE (guard , DEBUG , zobj )) {
567
+ if (ZEND_GUARD_OR_GC_IS_RECURSIVE (guard , EXPORT , zobj )) {
568
568
smart_str_appendl (buf , "NULL" , 4 );
569
569
zend_error (E_WARNING , "var_export does not handle circular references" );
570
570
return ;
571
571
}
572
- ZEND_GUARD_OR_GC_PROTECT_RECURSION (guard , DEBUG , zobj );
572
+ ZEND_GUARD_OR_GC_PROTECT_RECURSION (guard , EXPORT , zobj );
573
573
myht = zend_get_properties_for (struc , ZEND_PROP_PURPOSE_VAR_EXPORT );
574
574
if (level > 1 ) {
575
575
smart_str_appendc (buf , '\n' );
@@ -603,7 +603,7 @@ PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */
603
603
}
604
604
zend_release_properties (myht );
605
605
}
606
- ZEND_GUARD_OR_GC_UNPROTECT_RECURSION (guard , DEBUG , zobj );
606
+ ZEND_GUARD_OR_GC_UNPROTECT_RECURSION (guard , EXPORT , zobj );
607
607
if (level > 1 && !is_enum ) {
608
608
buffer_append_spaces (buf , level - 1 );
609
609
}
0 commit comments