Skip to content

Commit

Permalink
[fix] Fix unset data type conversion error #1089
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelaon committed Jun 9, 2023
1 parent 15a5340 commit 802251e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Medoo.php
Original file line number Diff line number Diff line change
Expand Up @@ -1348,14 +1348,14 @@ protected function columnMap($columns, array &$stack, bool $root): array

$stack[$value] = isset($keyMatch['type']) ?
[$columnKey, $keyMatch['type']] :
[$columnKey, 'String'];
[$columnKey];
} elseif ($this->isRaw($value)) {
preg_match('/([\p{L}_][\p{L}\p{N}@$#\-_]*\.)?(?<column>[\p{L}_][\p{L}\p{N}@$#\-_]*)(\s*\[(?<type>(String|Bool|Int|Number))\])?/u', $key, $keyMatch);
$columnKey = $keyMatch['column'];

$stack[$key] = isset($keyMatch['type']) ?
[$columnKey, $keyMatch['type']] :
[$columnKey, 'String'];
[$columnKey];
} elseif (!is_int($key) && is_array($value)) {
if ($root && count(array_keys($columns)) === 1) {
$stack[$key] = [$key, 'String'];
Expand Down

0 comments on commit 802251e

Please sign in to comment.