mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 00:36:38 +00:00
Merged two ifs in _validate_row_condition to prevent
This is to a sane count of zero PhpStorm inspections. In particular, this is NestedPositiveIfStatementsInspection from EA Extended.
This commit is contained in:
16
src/Csv.php
16
src/Csv.php
@@ -1017,16 +1017,14 @@ class Csv {
|
||||
$op = $capture[2];
|
||||
$value = $capture[3];
|
||||
|
||||
if (preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/', $value, $capture)) {
|
||||
if ($capture[1] == $capture[3]) {
|
||||
$value = strtr($capture[2], array(
|
||||
"\\n" => "\n",
|
||||
"\\r" => "\r",
|
||||
"\\t" => "\t",
|
||||
));
|
||||
if (preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/', $value, $capture) && $capture[1] == $capture[3]) {
|
||||
$value = strtr($capture[2], array(
|
||||
"\\n" => "\n",
|
||||
"\\r" => "\r",
|
||||
"\\t" => "\t",
|
||||
));
|
||||
|
||||
$value = stripslashes($value);
|
||||
}
|
||||
$value = stripslashes($value);
|
||||
}
|
||||
|
||||
if (array_key_exists($field, $row)) {
|
||||
|
||||
Reference in New Issue
Block a user