From bf9d0a74f78bc01566e43b306a28c49f05e6691f Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 30 Oct 2024 10:04:03 -0400 Subject: [PATCH] Added model className to rules errors log, bug fix implode() --- ARImportStrategy.php | 2 +- ARUpdateStrategy.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ARImportStrategy.php b/ARImportStrategy.php index 612d570..c3c9676 100644 --- a/ARImportStrategy.php +++ b/ARImportStrategy.php @@ -83,7 +83,7 @@ public function import(&$data) { if ($this->isActiveRecordUnique($uniqueAttributes) && $model->save()) { $importedPks[] = $model->primaryKey; } else { - Yii::warning($model->tableName() . ': ' . $model->getErrorSummary(true)); + Yii::warning($model->tableName() . ': ' . implode(',', $model->getErrorSummary(true))); } } } diff --git a/ARUpdateStrategy.php b/ARUpdateStrategy.php index 728c71e..3f5a903 100644 --- a/ARUpdateStrategy.php +++ b/ARUpdateStrategy.php @@ -36,7 +36,7 @@ protected function updateRecord($row, $values) { if($model->save()) { return true; } else { - Yii::warning($model->tableName() . ': ' . $model->getErrorSummary(true)); + Yii::warning($model->tableName() . ': ' . implode(',', $model->getErrorSummary(true))); return false; } } else {