Skip to content

Commit 5fa9539

Browse files
committed
ok
1 parent dfa46cc commit 5fa9539

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ClickHouseFunctions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function createTableQuick($table, $fields_arr, $if_exists = 0, $ver = nul
253253
// If $ver defined, then change db-engine to ReplacingMergeTree
254254
if (!\is_null($ver)) {
255255
$sql_arr[6] = 'ReplacingMergeTree';
256-
$sql_arr[14] .= (empty($ver) ? '': ", $ver");
256+
$sql_arr[14] .= (empty($ver) ? '' : ", $ver");
257257
}
258258

259259
return $this->queryFalse(\implode($sql_arr));
@@ -352,7 +352,7 @@ public function parseFieldsArr($fields_arr)
352352
if ($to_conv) {
353353
$lp = $to_conv[0];
354354
$rp = $to_conv[1];
355-
if (\substr($default,0, \strlen($lp)) != $lp) {
355+
if (\substr($default, 0, \strlen($lp)) != $lp) {
356356
$default = $lp . $this->quotePar($default) . $rp;
357357
}
358358
$create = 'DEFAULT ' . $default;
@@ -630,7 +630,7 @@ public function getTableInfo($table, $extended = 2)
630630
$column_bytes = $col_arr['data_uncompressed_bytes'];
631631
$sum_uncompressed_bytes += $column_bytes;
632632
$fixed_bytes = $this->parseType($col_arr['type']);
633-
if ($fixed_bytes) {
633+
if (!empty($fixed_bytes)) {
634634
$col_arr['fixed_bytes'] = $fixed_bytes;
635635
$col_rows_cnt = $column_bytes / $fixed_bytes;
636636
$rows_cnt = $col_rows_cnt;

0 commit comments

Comments
 (0)