Fix uninitialized stdClass in rarely used method

This commit is contained in:
BJRambo 2016-05-27 07:57:58 +09:00
parent 3bd25f9538
commit 508b6ed340
24 changed files with 68 additions and 19 deletions

View file

@ -132,10 +132,17 @@ class fileAdminModel extends file
*/
function getFilesCountByDate($date = '')
{
if($date) $args->regDate = date('Ymd', strtotime($date));
$args = new stdClass();
if($date)
{
$args->regDate = date('Ymd', strtotime($date));
}
$output = executeQuery('file.getFilesCount', $args);
if(!$output->toBool()) return 0;
if(!$output->toBool())
{
return 0;
}
return $output->data->count;
}