1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/spl/tests/bug78976.phpt
Christoph M. Becker 4cd6d384bd Fix #78976: SplFileObject::fputcsv returns -1 on failure
`php_stream_write()` returns `-1` on failure now, which has to be
catered to by `SplFileObject::fputcsv()` which still is supposed to
return `false` on failure.
2019-12-17 17:52:18 +01:00

10 lines
198 B
PHP

--TEST--
Bug #78976 (SplFileObject::fputcsv returns -1 on failure)
--FILE--
<?php
$file = new SplFileObject('php://memory', 'r');
var_dump($file->fputcsv(['foo', 'bar']));
?>
--EXPECT--
bool(false)