1--TEST-- 2SPL: SplFileObject::setCsvControl error 002 3--CREDITS-- 4Erwin Poeze <erwin.poeze at gmail.com> 5--FILE-- 6<?php 7file_put_contents('csv_control_data_error002.csv', 8<<<CDATA 9'groene appelen'|10 10'gele bananen'|20 11'rode kersen'|30 12CDATA 13); 14$s = new SplFileObject('csv_control_data_error002.csv'); 15$s->setFlags(SplFileObject::READ_CSV); 16try { 17 $s->setCsvControl('|', 'two'); 18} catch (ValueError $e) { 19 echo $e->getMessage(), "\n"; 20} 21?> 22--CLEAN-- 23<?php 24unlink('csv_control_data_error002.csv'); 25?> 26--EXPECT-- 27SplFileObject::setCsvControl(): Argument #2 ($enclosure) must be a single character 28