mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

open_mode was initialized to "wb", but the length set only to 1. The effect of this was that the stream is opened using "wb", but we only report "w". Fix the length to report the actually used open_mode.
19 lines
491 B
PHP
19 lines
491 B
PHP
--TEST--
|
|
SPL SplTempFileObject constructor sets correct defaults when pass 0 arguments
|
|
--FILE--
|
|
<?php
|
|
var_dump(new SplTempFileObject());
|
|
?>
|
|
--EXPECT--
|
|
object(SplTempFileObject)#1 (5) {
|
|
["pathName":"SplFileInfo":private]=>
|
|
string(10) "php://temp"
|
|
["fileName":"SplFileInfo":private]=>
|
|
string(10) "php://temp"
|
|
["openMode":"SplFileObject":private]=>
|
|
string(2) "wb"
|
|
["delimiter":"SplFileObject":private]=>
|
|
string(1) ","
|
|
["enclosure":"SplFileObject":private]=>
|
|
string(1) """
|
|
}
|