From 23337cada4665af06a15f706059b3b03a5685b8c Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Thu, 4 Jan 2018 16:16:09 +0800 Subject: [PATCH 1/2] Allow Laravel 5.6, fix #1568. --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b17f95eb..685feff3 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,11 @@ ], "require": { "php": ">=7.0", - "illuminate/database": "5.4.*|5.5.*", - "illuminate/filesystem": "5.4.*|5.5.*", - "illuminate/http": "5.4.*|5.5.*", - "illuminate/support": "5.4.*|5.5.*", - "illuminate/view": "5.4.*|5.5.*" + "illuminate/database": "5.4.*|5.5.*|5.6.*", + "illuminate/filesystem": "5.4.*|5.5.*|5.6.*", + "illuminate/http": "5.4.*|5.5.*|5.6.*", + "illuminate/support": "5.4.*|5.5.*|5.6.*", + "illuminate/view": "5.4.*|5.5.*|5.6.*" }, "require-dev": { "orchestra/testbench": "~3.5" From 3c6819b4928c5a556f3d2706186cb73027a4ba86 Mon Sep 17 00:00:00 2001 From: Ronald Edelschaap Date: Thu, 3 May 2018 14:07:05 +0200 Subject: [PATCH 2/2] [8.0] Fixed a bug for "undefined index" errors Fixed a bug for "undefined index" errors --- src/Utilities/Helper.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Utilities/Helper.php b/src/Utilities/Helper.php index 79e5c7b3..deda9521 100644 --- a/src/Utilities/Helper.php +++ b/src/Utilities/Helper.php @@ -156,10 +156,13 @@ public static function getOrMethod($method) public static function convertToArray($row) { $data = $row instanceof Arrayable ? $row->toArray() : (array) $row; - foreach (array_keys($data) as $key) { - if (is_object($data[$key]) || is_array($data[$key])) { - $data[$key] = self::convertToArray($data[$key]); + + foreach ($data as &$value) { + if (is_object($value) || is_array($value)) { + $value = self::convertToArray($value); } + + unset($value); } return $data;