1--TEST--
2SplFileObject::fgetcsv() enclosure error
3--FILE--
4<?php
5$fp = fopen('SplFileObject__fgetcsv5.csv', 'w+');
6fputcsv(
7    $fp,
8    [
9        'field1',
10        'field2',
11        'field3',
12        5,
13    ],
14    escape: '',
15);
16fclose($fp);
17
18$fo = new SplFileObject('SplFileObject__fgetcsv5.csv');
19$fo->setCsvControl(escape: '');
20try {
21    var_dump($fo->fgetcsv(enclosure: 'invalid'));
22} catch (ValueError $e) {
23    echo $e->getMessage(), "\n";
24}
25?>
26--CLEAN--
27<?php
28unlink('SplFileObject__fgetcsv5.csv');
29?>
30--EXPECT--
31SplFileObject::fgetcsv(): Argument #2 ($enclosure) must be a single character
32