File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -575,20 +575,16 @@ ZEND_FUNCTION(define)
575575 zend_error (E_WARNING , "define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported" );
576576 }
577577
578- if (Z_TYPE_P (val ) == IS_ARRAY ) {
579- if (Z_REFCOUNTED_P (val )) {
580- if (!validate_constant_array_argument (Z_ARRVAL_P (val ), 2 )) {
581- RETURN_THROWS ();
582- } else {
583- copy_constant_array (& c .value , val );
584- goto register_constant ;
585- }
578+ if (Z_TYPE_P (val ) == IS_ARRAY && Z_REFCOUNTED_P (val )) {
579+ if (!validate_constant_array_argument (Z_ARRVAL_P (val ), 2 )) {
580+ RETURN_THROWS ();
581+ } else {
582+ copy_constant_array (& c .value , val );
586583 }
584+ } else {
585+ ZVAL_COPY (& c .value , val );
587586 }
588587
589- ZVAL_COPY (& c .value , val );
590-
591- register_constant :
592588 /* non persistent */
593589 ZEND_CONSTANT_SET_FLAGS (& c , 0 , PHP_USER_CONSTANT );
594590 c .name = zend_string_copy (name );
You can’t perform that action at this time.
0 commit comments