fix bugs empty data
This commit is contained in:
parent
ef08b20d16
commit
5bb7d519fc
|
@ -51,6 +51,8 @@ class CaptureLogsController extends Controller {
|
||||||
])), true);
|
])), true);
|
||||||
$data = json_decode($tempConfig['data'], true);
|
$data = json_decode($tempConfig['data'], true);
|
||||||
$last = \app\models\ListManagement::find()->orderBy(['id' => SORT_DESC])->limit(1)->one();
|
$last = \app\models\ListManagement::find()->orderBy(['id' => SORT_DESC])->limit(1)->one();
|
||||||
|
if (!is_object($last))
|
||||||
|
$last = (object) ['id' => 0];
|
||||||
$idAuto = $data['data']['box_id'] . "_" . ($last->id + 1);
|
$idAuto = $data['data']['box_id'] . "_" . ($last->id + 1);
|
||||||
|
|
||||||
return $this->render('index', [
|
return $this->render('index', [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user