From: Vladimir Fomichev Date: Mon, 2 Sep 2024 11:52:36 +0000 (+0300) Subject: добавил проверку на наличие параметров функции X-Git-Tag: 1.4~15^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=eb724c6dadf621ceb43f58010827fb492a035c8b;p=erp24_rep%2Fyii-erp24%2F.git добавил проверку на наличие параметров функции --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index b9471ee7..b9d467af 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -160,6 +160,12 @@ class MotivationService */ public static function getMotivationDataTableSort($storeId = null, $year = null, $month = null) { + + // Проверка наличия обязательных параметров + if ($storeId === null || $year === null || $month === null) { + return []; + } + // 1. Запрос к таблице Motivation $motivation = Motivation::find() ->where([