@@ -267,8 +267,7 @@ |
||
267 | 267 | */ |
268 | 268 | private function _selectValue($value, string $link, string $type, $original): string |
269 | 269 | { |
270 | - $clause = ($value === null ? '<i>NULL</i>' : |
|
271 | - (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ? |
|
270 | + $clause = ($value === null ? '<i>NULL</i>' : (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ? |
|
272 | 271 | "<code>$value</code>" : $value)); |
273 | 272 | if (\preg_match('~blob|bytea|raw|file~', $type) && !$this->isUtf8($value)) { |
274 | 273 | $clause = '<i>' . $this->trans->lang('%d byte(s)', \strlen($original)) . '</i>'; |
@@ -20,8 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | $enumLength = $this->driver->enumLength(); |
22 | 22 | return (\preg_match("~^\\s*\\(?\\s*$enumLength(?:\\s*,\\s*$enumLength)*+\\s*\\)?\\s*\$~", $length) && |
23 | - \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' : |
|
24 | - \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
23 | + \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' : \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
25 | 24 | ); |
26 | 25 | } |
27 | 26 | |
@@ -123,7 +122,7 @@ discard block |
||
123 | 122 | $expressions = []; |
124 | 123 | foreach ($indexes as $i => $index) { |
125 | 124 | if ($index->type == 'FULLTEXT' && $this->input->values['fulltext'][$i] != '') { |
126 | - $columns = \array_map(function ($column) { |
|
125 | + $columns = \array_map(function($column) { |
|
127 | 126 | return $this->driver->escapeId($column); |
128 | 127 | }, $index->columns); |
129 | 128 | $expressions[] = 'MATCH (' . \implode(', ', $columns) . ') AGAINST (' . |