]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
добавил проверку на наличие параметров функции
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 2 Sep 2024 11:52:36 +0000 (14:52 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 2 Sep 2024 11:52:36 +0000 (14:52 +0300)
erp24/services/MotivationService.php

index b9471ee79030d328b39ff8403e9df4e3ef0a6619..b9d467afa4dd2517a29144b09d341b5c09f431ef 100644 (file)
@@ -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([