From 08a927f4962b6274f28d3ea8bf51f25e99806fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 21 Oct 2024 09:13:28 +0900 Subject: [PATCH] cfmgrv4 init...3 --- app/Services/Cloudflare/Account.php | 3 +++ app/Services/Cloudflare/Record.php | 3 +++ app/Services/Cloudflare/Zone.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/app/Services/Cloudflare/Account.php b/app/Services/Cloudflare/Account.php index 394f63d..5c949a2 100644 --- a/app/Services/Cloudflare/Account.php +++ b/app/Services/Cloudflare/Account.php @@ -65,6 +65,9 @@ class Account extends Cloudflare if (count(value: $results_array) > 0) { foreach ($results_array as $results) { foreach ($results as $result) { + if (is_array($result)) { + throw new \Exception("Account: result is array:\n" . var_export($result, true) . "\n"); + } $formDatas = $this->getArrayByResult($result); $entitys[$formDatas[AccountModel::PK]] = $this->getModel()->modify(new AccountEntity(), $formDatas); } diff --git a/app/Services/Cloudflare/Record.php b/app/Services/Cloudflare/Record.php index 7963d10..58332af 100644 --- a/app/Services/Cloudflare/Record.php +++ b/app/Services/Cloudflare/Record.php @@ -147,6 +147,9 @@ class Record extends Cloudflare if (count(value: $results_array) > 0) { foreach ($results_array as $results) { foreach ($results as $result) { + if (is_array($result)) { + throw new \Exception("Record: result is array:\n" . var_export($result, true) . "\n"); + } $formDatas = $this->getArrayByResult($result); $entitys[$formDatas[RecordModel::PK]] = $this->getModel()->modify(new RecordEntity(), $formDatas); } diff --git a/app/Services/Cloudflare/Zone.php b/app/Services/Cloudflare/Zone.php index 2c38148..4f42131 100644 --- a/app/Services/Cloudflare/Zone.php +++ b/app/Services/Cloudflare/Zone.php @@ -153,6 +153,9 @@ class Zone extends Cloudflare if (count(value: $results_array) > 0) { foreach ($results_array as $results) { foreach ($results as $result) { + if (is_array($result)) { + throw new \Exception("Zone: result is array:\n" . var_export($result, true) . "\n"); + } $formDatas = $this->getArrayByResult($result); $formDatas = $this->getCFSetting($formDatas[ZoneModel::PK], $formDatas); $entitys[$formDatas[ZoneModel::PK]] = $this->getModel()->modify(new ZoneEntity(), $formDatas);