summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-07-22 14:11:25 +0000
committerFelipe Pena <felipe@php.net>2008-07-22 14:11:25 +0000
commit4ca3f3b99a7b48c1462bfd6ee36b62930f19c9cd (patch)
tree7d5800e1931a5e1a9eac2a4c8c30ab5cf341ed0b /sapi
parentfbc897f4bb56c81075c988a9ce11164b3c577b1a (diff)
downloadphp-git-4ca3f3b99a7b48c1462bfd6ee36b62930f19c9cd.tar.gz
- MFH: Fixed bug #44246 (closedir() accepts a file resource opened by fopen())
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cli/php_cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 5e5bb6015d..f8c84e8627 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -504,6 +504,10 @@ static void cli_register_file_handles(TSRMLS_D) /* {{{ */
if (s_err) php_stream_close(s_err);
return;
}
+
+ s_in->flags |= PHP_STREAM_FLAG_FCLOSE;
+ s_out->flags |= PHP_STREAM_FLAG_FCLOSE;
+ s_err->flags |= PHP_STREAM_FLAG_FCLOSE;
#if PHP_DEBUG
/* do not close stdout and stderr */