diff options
Diffstat (limited to 'sqlbox')
-rw-r--r-- | sqlbox/locallib.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlbox/locallib.php b/sqlbox/locallib.php index 2968e3f..e913291 100644 --- a/sqlbox/locallib.php +++ b/sqlbox/locallib.php @@ -51,7 +51,7 @@ function db_table_from_query($db, $query) { $n = pg_num_fields($result); for ($i = 0; $i < $n; $i++) $table->head[] = pg_field_name($result, $i); - $table->align = array_fill(0, $n, 'left'); + $table->align = $n > 0 ? array_fill(0, $n, 'left') : array(); while ($row = pg_fetch_row($result)) $table->data[] = $row; |