@@ -139,7 +139,7 @@ |
||
139 | 139 | } |
140 | 140 | } |
141 | 141 | if (\preg_match("~ IDENTIFIED BY PASSWORD '([^']+)~", $row[0], $match)) { |
142 | - $password = $match[1]; |
|
142 | + $password = $match[1]; |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function html(?string $string) |
82 | 82 | { |
83 | - if(!$string) { |
|
83 | + if (!$string) { |
|
84 | 84 | return $string; |
85 | 85 | } |
86 | 86 | return \str_replace("\0", '�', \htmlspecialchars($string, ENT_QUOTES, 'utf-8')); |
@@ -520,9 +520,8 @@ discard block |
||
520 | 520 | \preg_match_all("~'((?:[^']|'')*)'~", $field->length, $matches); |
521 | 521 | foreach ($matches[1] as $i => $val) { |
522 | 522 | $val = \stripcslashes(\str_replace("''", "'", $val)); |
523 | - $checked = (\is_int($value) ? $value == $i + 1 : |
|
524 | - (\is_array($value) ? \in_array($i+1, $value) : $value === $val)); |
|
525 | - $inputs[] = "<label><input type='$type'$attrs value='" . ($i+1) . "'" . |
|
523 | + $checked = (\is_int($value) ? $value == $i + 1 : (\is_array($value) ? \in_array($i + 1, $value) : $value === $val)); |
|
524 | + $inputs[] = "<label><input type='$type'$attrs value='" . ($i + 1) . "'" . |
|
526 | 525 | ($checked ? ' checked' : '') . '>' . $this->html($this->editValue($val, $field)) . '</label>'; |
527 | 526 | } |
528 | 527 | |
@@ -586,8 +585,7 @@ discard block |
||
586 | 585 | } |
587 | 586 | $enumLength = $this->driver->enumLength(); |
588 | 587 | return (\preg_match("~^\\s*\\(?\\s*$enumLength(?:\\s*,\\s*$enumLength)*+\\s*\\)?\\s*\$~", $length) && |
589 | - \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' : |
|
590 | - \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
588 | + \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' : \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
591 | 589 | ); |
592 | 590 | } |
593 | 591 | |
@@ -769,7 +767,7 @@ discard block |
||
769 | 767 | $expressions = []; |
770 | 768 | foreach ($indexes as $i => $index) { |
771 | 769 | if ($index->type == 'FULLTEXT' && $this->input->values['fulltext'][$i] != '') { |
772 | - $columns = \array_map(function ($column) { |
|
770 | + $columns = \array_map(function($column) { |
|
773 | 771 | return $this->driver->escapeId($column); |
774 | 772 | }, $index->columns); |
775 | 773 | $expressions[] = 'MATCH (' . \implode(', ', $columns) . ') AGAINST (' . |
@@ -884,8 +882,7 @@ discard block |
||
884 | 882 | */ |
885 | 883 | private function _selectValue($value, string $link, string $type, string $original) |
886 | 884 | { |
887 | - $clause = ($value === null ? '<i>NULL</i>' : |
|
888 | - (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ? |
|
885 | + $clause = ($value === null ? '<i>NULL</i>' : (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ? |
|
889 | 886 | "<code>$value</code>" : $value)); |
890 | 887 | if (\preg_match('~blob|bytea|raw|file~', $type) && !$this->isUtf8($value)) { |
891 | 888 | $clause = '<i>' . $this->trans->lang('%d byte(s)', \strlen($original)) . '</i>'; |