From 857273ca79633c95b1d45ef7debea326abf687e2 Mon Sep 17 00:00:00 2001 From: Richard Keys Date: Tue, 15 Sep 2020 16:50:52 +0100 Subject: [PATCH] Added use for Str and modified check for a rows keys prop --- src/SearchConsoleClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SearchConsoleClient.php b/src/SearchConsoleClient.php index 3f43265..53b73cc 100644 --- a/src/SearchConsoleClient.php +++ b/src/SearchConsoleClient.php @@ -7,6 +7,7 @@ use GuzzleHttp\Client; use Illuminate\Support\Arr; use Illuminate\Support\Collection; +use Illuminate\Support\Str; class SearchConsoleClient { @@ -67,7 +68,7 @@ public function performQuery($siteUrl, $rows, $request): Collection * https://productforums.google.com/forum/?hl=en#!topic/webmasters/wF_Rm9CGr4U */ - if (count($row->getKeys())) { + if (is_array($row->getKeys()) && count($row->getKeys())) { $item = array_combine($request->getDimensions(), $row->getKeys()); $uniqueHash = $this->getUniqueItemHash($row, $request); } else {