From 934131f1dcfd35dd7c31bddffd989e3e1f826f4e Mon Sep 17 00:00:00 2001 From: Smirnow Aleksey Date: Tue, 17 Jan 2023 15:02:21 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20#32=20=D0=BE=D1=82=20php=208.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Small fix bug on php 8. #32 --- .../mapstv/elements/snippets/JSONtoChunk.snippet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/components/mapstv/elements/snippets/JSONtoChunk.snippet.php b/core/components/mapstv/elements/snippets/JSONtoChunk.snippet.php index f949f83..f3cd987 100644 --- a/core/components/mapstv/elements/snippets/JSONtoChunk.snippet.php +++ b/core/components/mapstv/elements/snippets/JSONtoChunk.snippet.php @@ -10,10 +10,10 @@ */ $output = $input; $array = $modx->fromJSON($input); -if (count($array) > 0) { +if ($array && count($array) > 0) { $chunk = $modx->getObject('modChunk', array('name' => $options)); if ($chunk) { $output = $chunk->process($array); } } -return $output; \ No newline at end of file +return $output;