diff --git a/src/Medoo.php b/src/Medoo.php index 2b113fb9..8a5322e7 100644 --- a/src/Medoo.php +++ b/src/Medoo.php @@ -2,7 +2,7 @@ /*! * Medoo database framework * https://medoo.in - * Version 1.5.1 + * Version 1.5.2 * * Copyright 2017, Angel Lai * Released under the MIT license @@ -1032,7 +1032,7 @@ protected function columnMap($columns, &$stack) { preg_match('/([a-zA-Z0-9_]+\.)?(?[a-zA-Z0-9_]+)(?:\s*\((?[a-zA-Z0-9_]+)\))?(?:\s*\[(?(?:String|Bool|Int|Number|Object|JSON))\])?/i', $value, $key_match); - $column_key = isset($key_match[ 'alias' ]) ? + $column_key = !empty($key_match[ 'alias' ]) ? $key_match[ 'alias' ] : $key_match[ 'column' ];