From 7b22d7d9e7eddf8b542ace9a72e7267f49f9ae50 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 20 Jun 2023 21:03:45 +0200 Subject: [PATCH] deprecated warning fix --- web/modules/custom/materio_sapi/src/Controller/Base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/materio_sapi/src/Controller/Base.php b/web/modules/custom/materio_sapi/src/Controller/Base.php index 8a462d25..83bfd617 100644 --- a/web/modules/custom/materio_sapi/src/Controller/Base.php +++ b/web/modules/custom/materio_sapi/src/Controller/Base.php @@ -338,11 +338,11 @@ class Base extends ControllerBase { // $this->terms = $request->query->get('terms'); $t = $request->query->get('terms'); // $this->terms = strlen($t) ? explode(',', $t) : null; - $this->terms = strlen($t) ? json_decode($t) : null; + $this->terms = $t && strlen($t) ? json_decode($t) : null; // get the filters of advanced search $f = $request->query->get('filters'); - $this->filters = strlen($f) ? explode(',', $f) : null; + $this->filters = $f && strlen($f) ? explode(',', $f) : null; // $this->allparams = $request->query->all(); // $request->attributes->get('_raw_variables')->get('filters') //