try {
$apiCron = ApiCron::find()->where(['status' => 0])->orderBy(['date' => SORT_ASC])->one();
-
- if ($apiCron && $apiCron->id) {
+
+ $mess['debug'] = [
+ 'is_object' => is_object($apiCron),
+ 'class' => get_class($apiCron),
+ 'attributes' => $apiCron ? $apiCron->attributes : null,
+ 'errors' => $apiCron ? $apiCron->errors : null
+ ];
+ if (!empty($apiCron) && empty($mess['create_orders'])) {
$mess['line'][] = __LINE__;
$jsonId = $apiCron->request_id;
// $apiCron2 = ApiCron::find()->where(['id' => $apiCron->id])->andWhere(['request_id' => ''])->one();