Skip to content

Commit 61ad0d9

Browse files
committed
Fix build
1 parent da1cbd2 commit 61ad0d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sapi/cli/php_cli.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ static void php_cli_usage(char *argv0)
526526

527527
static php_stream *s_in_process = NULL;
528528

529-
static void cli_register_file_handles(void) /* {{{ */
529+
static void cli_register_file_handles(bool no_close) /* {{{ */
530530
{
531531
php_stream *s_in, *s_out, *s_err;
532532
php_stream_context *sc_in=NULL, *sc_out=NULL, *sc_err=NULL;
@@ -954,7 +954,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
954954
switch (behavior) {
955955
case PHP_MODE_STANDARD:
956956
if (script_file) {
957-
cli_register_file_handles();
957+
cli_register_file_handles(/* no_close */ PHP_DEBUG || num_repeats > 1);
958958
}
959959

960960
if (interactive) {
@@ -990,7 +990,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
990990
}
991991
break;
992992
case PHP_MODE_CLI_DIRECT:
993-
cli_register_file_handles();
993+
cli_register_file_handles(/* no_close */ PHP_DEBUG || num_repeats > 1);
994994
zend_eval_string_ex(exec_direct, NULL, "Command line code", 1);
995995
break;
996996

@@ -1005,7 +1005,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
10051005
file_handle.filename = NULL;
10061006
}
10071007

1008-
cli_register_file_handles();
1008+
cli_register_file_handles(/* no_close */ PHP_DEBUG || num_repeats > 1);
10091009

10101010
if (exec_begin) {
10111011
zend_eval_string_ex(exec_begin, NULL, "Command line begin code", 1);

0 commit comments

Comments
 (0)