mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +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];
|
$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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user