From: Vladimir Fomichev Date: Fri, 15 Aug 2025 11:00:52 +0000 (+0300) Subject: Логирование request X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=61bc5299cb04b4b529799b9d96241908f8eafa76;p=erp24_rep%2Fyii-erp24%2F.git Логирование request --- diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 7c9b3bf8..d56434ef 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -232,14 +232,8 @@ class DataController extends BaseController try { $apiCron = ApiCron::find()->where(['status' => 0])->orderBy(['date' => SORT_ASC])->one(); - $mess['line'][] = json_encode($apiCron, JSON_UNESCAPED_UNICODE); - $mess['debug'] = [ - 'is_object' => is_object($apiCron), - 'class' => get_class($apiCron), - 'attributes' => $apiCron ? $apiCron->attributes : null, - 'errors' => $apiCron ? $apiCron->errors : null - ]; - if (!empty($apiCron)) { + + if ($apiCron && $apiCron->id) { $mess['line'][] = __LINE__; $jsonId = $apiCron->request_id; // $apiCron2 = ApiCron::find()->where(['id' => $apiCron->id])->andWhere(['request_id' => ''])->one();