Skip to content

Commit 2f586e9

Browse files
committed
Fixed bug #39969 (ini setting short_open_tag has no effect when using --enable-maintainer-zts)
1 parent 6b7144d commit 2f586e9

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ PHP NEWS
2323
(Chris Jones, Tony)
2424
- Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
2525
establish a new connection). (Ilia)
26+
- Fixed bug #39969 (ini setting short_open_tag has no effect when using
27+
--enable-maintainer-zts). (Dmitry)
2628
- Fixed bug #39504 (xmlwriter_write_dtd_entity() creates Attlist tag,
2729
not entity). (Hannes)
2830
- Fixed bug #39449 (Overloaded array properties do not work correctly).

Zend/zend.c

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,25 @@ static void register_standard_class(TSRMLS_D)
426426
zend_hash_add(CG(class_table), "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
427427
}
428428

429+
#ifdef ZTS
430+
static zend_bool asp_tags_default = 0;
431+
static zend_bool short_tags_default = 1;
432+
static zend_bool ct_pass_ref_default = 1;
433+
static zend_bool extended_info_default = 0;
434+
#else
435+
# define asp_tags_default 0
436+
# define short_tags_default 1
437+
# define ct_pass_ref_default 1
438+
# define extended_info_default 0
439+
#endif
440+
429441
static void zend_set_default_compile_time_values(TSRMLS_D)
430442
{
431443
/* default compile-time values */
432-
CG(asp_tags) = 0;
433-
CG(short_tags) = 1;
434-
CG(allow_call_time_pass_reference) = 1;
435-
CG(extended_info) = 0;
444+
CG(asp_tags) = asp_tags_default;
445+
CG(short_tags) = short_tags_default;
446+
CG(allow_call_time_pass_reference) = ct_pass_ref_default;
447+
CG(extended_info) = extended_info_default;
436448
}
437449

438450

@@ -695,6 +707,12 @@ void zend_post_startup(TSRMLS_D)
695707
*GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
696708
*GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
697709
*GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;
710+
711+
asp_tags_default = CG(asp_tags);
712+
short_tags_default = CG(short_tags);
713+
ct_pass_ref_default = CG(allow_call_time_pass_reference);
714+
extended_info_default = CG(extended_info);
715+
698716
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
699717
free(compiler_globals->function_table);
700718
free(compiler_globals->class_table);

0 commit comments

Comments
 (0)