Category
Regression: · php-src-strict · SplFileObject CSV separator ValueError wording
Problem
SplFileObject::fgetcsv('') / fputcsv(..., '') on Zend throw ValueError naming SplFileObject::fgetcsv(): Argument #1 ($separator) / SplFileObject::fputcsv(): Argument #2 ($separator). VM reuses the free-function fgetcsv()/fputcsv() path and cites fgetcsv(): Argument #3 ($separator) / fputcsv(): Argument #3 ($separator).
Probed 2026-08-16 — host Zend PHP 8.2.32 vs php bin/vm.php.
| Repro |
Zend 8.2+ |
VM (2026-08-16) |
$o->fgetcsv('') |
ValueError: SplFileObject::fgetcsv(): Argument #1 ($separator) must be a single character |
ValueError: fgetcsv(): Argument #3 ($separator) … |
$o->fputcsv(['x'], '') |
ValueError: SplFileObject::fputcsv(): Argument #2 ($separator) … |
ValueError: fputcsv(): Argument #3 ($separator) … |
php-src reference
- php/php-src
ext/spl/spl_directory.c — SPL_METHOD(SplFileObject, fgetcsv) / fputcsv
- Free-function wording differs because stream arg shifts indices (php-src
ext/standard/file.c)
PHP implementation target
ext/spl/ SplFileObject CSV methods — pass method-shaped function name + 1-based arg indices into shared CSV separator guard (do not hardcode free-function fgetcsv/fputcsv labels)
- PHP-in-PHP; no new
runtime/*.c
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_splfileobject_csv_separator_message.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_splfileobject_csv_separator_message.php'
Done when
Category
Regression:· php-src-strict · SplFileObject CSV separator ValueError wordingProblem
SplFileObject::fgetcsv('')/fputcsv(..., '')on Zend throwValueErrornamingSplFileObject::fgetcsv(): Argument #1 ($separator)/SplFileObject::fputcsv(): Argument #2 ($separator). VM reuses the free-functionfgetcsv()/fputcsv()path and citesfgetcsv(): Argument #3 ($separator)/fputcsv(): Argument #3 ($separator).Probed 2026-08-16 — host Zend PHP 8.2.32 vs
php bin/vm.php.$o->fgetcsv('')ValueError: SplFileObject::fgetcsv(): Argument #1 ($separator) must be a single characterValueError: fgetcsv(): Argument #3 ($separator) …$o->fputcsv(['x'], '')ValueError: SplFileObject::fputcsv(): Argument #2 ($separator) …ValueError: fputcsv(): Argument #3 ($separator) …php-src reference
ext/spl/spl_directory.c—SPL_METHOD(SplFileObject, fgetcsv)/fputcsvext/standard/file.c)PHP implementation target
ext/spl/SplFileObject CSV methods — pass method-shaped function name + 1-based arg indices into shared CSV separator guard (do not hardcode free-functionfgetcsv/fputcsvlabels)runtime/*.cRepro
Done when
$separator)