Skip to content

Commit 2fbe877

Browse files
committed
TypeError on invalid resource stream in fclose
1 parent e699b28 commit 2fbe877

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,8 @@ PHPAPI PHP_FUNCTION(fclose)
913913
PHP_STREAM_TO_ZVAL(stream, res);
914914

915915
if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
916-
php_error_docref(NULL, E_WARNING, "%d is not a valid stream resource", stream->res->handle);
917-
RETURN_FALSE;
916+
zend_type_error("%d is not a valid stream resource", stream->res->handle);
917+
return;
918918
}
919919

920920
php_stream_free(stream,

0 commit comments

Comments
 (0)