Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed bug #43510 (stream_get_meta_data() does not return same mode …
…as used in fopen)
- Loading branch information
Jani Taskinen
committed
Aug 1, 2009
1 parent
2f57760
commit df61b3c
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Bug #43510: stream_get_meta_data() does not return same mode as used in fopen | ||
--SKIPIF-- | ||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> | ||
--FILE-- | ||
<?php | ||
require 'server.inc'; | ||
|
||
$responses = array( | ||
"data://text/plain,HTTP/1.0 200 OK\r\n\r\n", | ||
"data://text/plain,HTTP/1.0 200 OK\r\n\r\n", | ||
); | ||
|
||
$pid = http_server("tcp://127.0.0.1:12342", $responses, $output); | ||
|
||
foreach(array('r', 'rb') as $mode) { | ||
$fd = fopen('http://127.0.0.1:12342/', $mode, false); | ||
$meta = stream_get_meta_data($fd); | ||
var_dump($meta['mode']); | ||
fclose($fd); | ||
} | ||
|
||
http_server_kill($pid); | ||
|
||
?> | ||
--EXPECT-- | ||
string(1) "r" | ||
string(2) "rb" |