summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2008-07-23 11:25:14 +0000
committerAntony Dovgal <tony2001@php.net>2008-07-23 11:25:14 +0000
commit28a22396d4c12253f77c11095f37944a0dd661b9 (patch)
tree4a67877db12d22a70a443b40a74a74ee0e2efe9a /ext/standard/file.c
parent16ace1828e85f7cbe1179a29c88dad6d921e2a71 (diff)
downloadphp-git-28a22396d4c12253f77c11095f37944a0dd661b9.tar.gz
MFH: invert the logics - FLAG_FCLOSE -> FLAG_NO_FCLOSE
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 6bc27a8d82..c8178e0581 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -856,8 +856,6 @@ PHP_NAMED_FUNCTION(php_if_tmpfile)
stream = php_stream_fopen_tmpfile();
if (stream) {
- stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
php_stream_to_zval(stream, return_value);
} else {
RETURN_FALSE;
@@ -888,8 +886,6 @@ PHP_NAMED_FUNCTION(php_if_fopen)
RETURN_FALSE;
}
- stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
php_stream_to_zval(stream, return_value);
}
/* }}} */
@@ -907,7 +903,7 @@ PHPAPI PHP_FUNCTION(fclose)
PHP_STREAM_TO_ZVAL(stream, &arg1);
- if (!(stream->flags & PHP_STREAM_FLAG_FCLOSE)) {
+ if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a valid stream resource", stream->rsrc_id);
RETURN_FALSE;
}