From: Vladimir Fomichev Date: Fri, 15 Aug 2025 11:16:23 +0000 (+0300) Subject: Логирование request X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0bd7d63abced3f34b1873b5abd2b69995188c2d2;p=erp24_rep%2Fyii-erp24%2F.git Логирование request --- diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index d56434ef..ec992b0a 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -232,8 +232,14 @@ class DataController extends BaseController 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();