Skip to content

Commit 8b3072e

Browse files
committed
Explicitly provide $escape to str_getcsv
1 parent a8de3f0 commit 8b3072e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/Context/Support.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ protected function check_that_json_string_contains_json_string( $actual_json, $e
172172
* @return bool Whether $actual_csv contains $expected_csv
173173
*/
174174
protected function check_that_csv_string_contains_values( $actual_csv, $expected_csv ) {
175-
$actual_csv = array_map( 'str_getcsv', explode( PHP_EOL, $actual_csv ) );
175+
$actual_csv = array_map(
176+
static function ( $str ) {
177+
return str_getcsv( $str, ',', '"', "\\" );
178+
}, explode( PHP_EOL, $actual_csv ) );
176179

177180
if ( empty( $actual_csv ) ) {
178181
return false;

0 commit comments

Comments
 (0)