]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Убрал false из сохранения
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 28 Mar 2025 09:31:24 +0000 (12:31 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 28 Mar 2025 09:31:24 +0000 (12:31 +0300)
erp24/records/BouquetComposition.php

index 85bf924851992844fd2fe9ffc3942fa7b671fa17..77904b2467e14356e62cf5a546516542bf36a358 100644 (file)
@@ -230,7 +230,15 @@ class BouquetComposition extends ActiveRecord
                     $fileRecord = Files::findOne($fileId);
                     if ($fileRecord) {
                         $fileRecord->created_at = date("Y-m-d H:i:s", $time + $index);
-                        $fileRecord->save(false);
+                        if (!$fileRecord->save()) {
+                            Yii::error(
+                                'Не удалось обновить файл' . json_encode(
+                                    $fileRecord->getErrors(),
+                                    JSON_UNESCAPED_UNICODE
+                                ),
+                                __METHOD__
+                            );
+                        }
                     }
                 }
             }