Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/bz2/tests/004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ array(2) {
}
string(10) "DATA_ERROR"
int(-4)
bzread(): supplied resource is not a valid stream resource
bzerror(): supplied resource is not a valid stream resource
bzerrstr(): supplied resource is not a valid stream resource
bzerrno(): supplied resource is not a valid stream resource
bzread(): Argument #1 ($bz) must be an open stream resource
bzerror(): Argument #1 ($bz) must be an open stream resource
bzerrstr(): Argument #1 ($bz) must be an open stream resource
bzerrno(): Argument #1 ($bz) must be an open stream resource
Done
4 changes: 2 additions & 2 deletions ext/sockets/tests/socket_export_stream-4-win.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ stream_set_blocking 1


close stream
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block
Warning: socket_set_block(): unable to set blocking mode [%d]: An operation was attempted on something that is not a socket in %s on line %d
Expand All @@ -103,7 +103,7 @@ Warning: socket_get_option(): Unable to retrieve socket option [%d]: An operatio


close socket
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block Error: socket_set_block(): Argument #1 ($socket) has already been closed

Expand Down
4 changes: 2 additions & 2 deletions ext/sockets/tests/socket_export_stream-4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ stream_set_blocking 1


close stream
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block
Warning: socket_set_block(): unable to set blocking mode [%d]: %s in %s on line %d
Expand All @@ -105,7 +105,7 @@ Warning: socket_get_option(): Unable to retrieve socket option [%d]: %s in %s on


close socket
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block Error: socket_set_block(): Argument #1 ($socket) has already been closed

Expand Down
4 changes: 2 additions & 2 deletions ext/sockets/tests/socket_import_stream-4-win.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ stream_set_blocking 1


close stream
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block
Warning: socket_set_block(): unable to set blocking mode [10038]: %s in %ssocket_import_stream-4-win.php on line %d
Expand All @@ -98,7 +98,7 @@ Warning: socket_get_option(): Unable to retrieve socket option [10038]: %s in %s


close socket
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block Error: socket_set_block(): Argument #1 ($socket) has already been closed

Expand Down
4 changes: 2 additions & 2 deletions ext/sockets/tests/socket_import_stream-4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ stream_set_blocking 1


close stream
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block
Warning: socket_set_block(): unable to set blocking mode [%d]: %s in %s on line %d
Expand All @@ -100,7 +100,7 @@ Warning: socket_get_option(): Unable to retrieve socket option [%d]: %s in %s on


close socket
stream_set_blocking TypeError: stream_set_blocking(): supplied resource is not a valid stream resource
stream_set_blocking TypeError: stream_set_blocking(): Argument #1 ($stream) must be an open stream resource

socket_set_block Error: socket_set_block(): Argument #1 ($socket) has already been closed

Expand Down
2 changes: 1 addition & 1 deletion ext/spl/tests/bug81691.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ var_dump($obj->fgets());

?>
--EXPECTF--
Warning: fclose(): %d is not a valid stream resource in %s on line %d
Warning: fclose(): cannot close the provided stream, as it must not be manually closed in %s on line %d
string(6) "<?php
"
2 changes: 1 addition & 1 deletion ext/standard/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ PHPAPI PHP_FUNCTION(fclose)
ZEND_PARSE_PARAMETERS_END();

if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
php_error_docref(NULL, E_WARNING, ZEND_LONG_FMT " is not a valid stream resource", stream->res->handle);
php_error_docref(NULL, E_WARNING, "cannot close the provided stream, as it must not be manually closed");
RETURN_FALSE;
}

Expand Down
96 changes: 48 additions & 48 deletions ext/standard/tests/file/007_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -102,170 +102,170 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'wb' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'wt' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'w+' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'w+b' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'w+t' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'r' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'rb' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'rt' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'r+' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'r+b' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'r+t' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'a' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'ab' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'at' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'a+' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'a+t' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'a+b' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource

-- Iteration with mode 'x' --
resource(%d) of type (stream)
int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

-- Iteration with mode 'xb' --
Expand All @@ -274,8 +274,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

-- Iteration with mode 'xt' --
Expand All @@ -284,8 +284,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

-- Iteration with mode 'x+' --
Expand All @@ -294,8 +294,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

-- Iteration with mode 'x+b' --
Expand All @@ -304,8 +304,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

-- Iteration with mode 'x+t' --
Expand All @@ -314,8 +314,8 @@ int(0)
bool(false)
bool(true)
resource(%d) of type (Unknown)
ftell(): supplied resource is not a valid stream resource
feof(): supplied resource is not a valid stream resource
ftell(): Argument #1 ($stream) must be an open stream resource
feof(): Argument #1 ($stream) must be an open stream resource
resource(%d) of type (Unknown)

*** Done ***
2 changes: 1 addition & 1 deletion ext/standard/tests/file/fclose_variation1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ try {
echo "\nDone.\n";
?>
--EXPECT--
fread(): supplied resource is not a valid stream resource
fread(): Argument #1 ($stream) must be an open stream resource

Done.
2 changes: 1 addition & 1 deletion ext/standard/tests/file/feof_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ bool(false)
*** testing feof after a seek passed the end ***
bool(false)
*** closing file, testing eof ***
feof(): supplied resource is not a valid stream resource
feof(): Argument #1 ($stream) must be an open stream resource
Done
2 changes: 1 addition & 1 deletion ext/standard/tests/file/fgetc_variation2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ echo "Done";
--EXPECT--
*** Testing fgetc() : usage variations ***
-- Testing fgetc() with closed handle --
fgetc(): supplied resource is not a valid stream resource
fgetc(): Argument #1 ($stream) must be an open stream resource
Done
4 changes: 2 additions & 2 deletions ext/standard/tests/file/fgets_variation2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ echo "Done";
--EXPECT--
*** Testing fgets() : usage variations ***
-- Testing fgets() with closed handle --
fgets(): supplied resource is not a valid stream resource
fgets(): supplied resource is not a valid stream resource
fgets(): Argument #1 ($stream) must be an open stream resource
fgets(): Argument #1 ($stream) must be an open stream resource
Done
Loading
Loading