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
531 B
PHP
19 lines
531 B
PHP
--TEST--
|
|
SPL SplTempFileObject constructor sets correct values when passed fixed memory size
|
|
--FILE--
|
|
<?php
|
|
var_dump(new SplTempFileObject(1024));
|
|
?>
|
|
--EXPECT--
|
|
object(SplTempFileObject)#1 (5) {
|
|
["pathName":"SplFileInfo":private]=>
|
|
string(25) "php://temp/maxmemory:1024"
|
|
["fileName":"SplFileInfo":private]=>
|
|
string(25) "php://temp/maxmemory:1024"
|
|
["openMode":"SplFileObject":private]=>
|
|
string(2) "wb"
|
|
["delimiter":"SplFileObject":private]=>
|
|
string(1) ","
|
|
["enclosure":"SplFileObject":private]=>
|
|
string(1) """
|
|
}
|