mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix #2186 type error when unexpected values are passed to columnList
This commit is contained in:
parent
a4b49048f3
commit
9ca2c94fe4
3 changed files with 4 additions and 2 deletions
|
|
@ -269,7 +269,7 @@ class DB
|
|||
}
|
||||
|
||||
// Force the column list to a numerical array.
|
||||
$column_list = is_array($column_list) ? array_values($column_list) : array();
|
||||
$column_list = array_values($column_list);
|
||||
|
||||
// Start measuring elapsed time.
|
||||
$start_time = microtime(true);
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ function getClass($module_name): ?ModuleObject
|
|||
function executeQuery($query_id, $args = [], $column_list = [], string $result_type = 'auto', string $result_class = 'stdClass'): Rhymix\Framework\Helpers\DBResultHelper
|
||||
{
|
||||
$oDB = Rhymix\Framework\DB::getInstance();
|
||||
$column_list = is_array($column_list) ? $column_list : [];
|
||||
return $oDB->executeQuery($query_id, $args, $column_list, $result_type, $result_class);
|
||||
}
|
||||
|
||||
|
|
@ -160,6 +161,7 @@ function executeQuery($query_id, $args = [], $column_list = [], string $result_t
|
|||
function executeQueryArray($query_id, $args = [], $column_list = [], string $result_class = 'stdClass'): Rhymix\Framework\Helpers\DBResultHelper
|
||||
{
|
||||
$oDB = Rhymix\Framework\DB::getInstance();
|
||||
$column_list = is_array($column_list) ? $column_list : [];
|
||||
return $oDB->executeQuery($query_id, $args, $column_list, 'array', $result_class);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ class CommentModel extends Comment
|
|||
$args->statusList = $statusList;
|
||||
}
|
||||
|
||||
$output = executeQuery('comment.getCommentCount', $args, NULL);
|
||||
$output = executeQuery('comment.getCommentCount', $args);
|
||||
$total_count = $output->data->count;
|
||||
|
||||
return (int) $total_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue