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:
Fonata
2018-03-17 12:17:25 +01:00
parent f5ff7332a4
commit 93f177a396

View File

@@ -1017,16 +1017,14 @@ class Csv {
$op = $capture[2]; $op = $capture[2];
$value = $capture[3]; $value = $capture[3];
if (preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/', $value, $capture)) { if (preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/', $value, $capture) && $capture[1] == $capture[3]) {
if ($capture[1] == $capture[3]) { $value = strtr($capture[2], array(
$value = strtr($capture[2], array( "\\n" => "\n",
"\\n" => "\n", "\\r" => "\r",
"\\r" => "\r", "\\t" => "\t",
"\\t" => "\t", ));
));
$value = stripslashes($value); $value = stripslashes($value);
}
} }
if (array_key_exists($field, $row)) { if (array_key_exists($field, $row)) {