From 8b112f8feca6dff8c5a9fac877e74f3603a7d601 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 13 Dec 2022 22:16:38 +0100 Subject: [PATCH] array goes stdClass --- inc/class.epcfilter.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/class.epcfilter.php b/inc/class.epcfilter.php index 5dca708..086d0a9 100644 --- a/inc/class.epcfilter.php +++ b/inc/class.epcfilter.php @@ -110,29 +110,29 @@ abstract class epcFilter { $opt = json_decode((string) dcCore::app()->blog->settings->__get(basename(dirname('../' . __DIR__)))->__get($this->id)); - if (!is_array($opt)) { + if (empty($opt)) { $opt = []; } - if (isset($opt['nocase'])) { - $this->settings['nocase'] = (bool) $opt['nocase']; + if (isset($opt->nocase)) { + $this->settings['nocase'] = (bool) $opt->nocase; } - if (isset($opt['plural'])) { - $this->settings['plural'] = (bool) $opt['plural']; + if (isset($opt->plural)) { + $this->settings['plural'] = (bool) $opt->plural; } - if (isset($opt['limit'])) { - $this->settings['limit'] = abs((int) $opt['limit']); + if (isset($opt->limit)) { + $this->settings['limit'] = abs((int) $opt->limit); } - if (isset($opt['style']) && is_array($opt['style'])) { - $this->settings['style'] = (array) $opt['style']; + if (isset($opt->style) && is_array($opt->style)) { + $this->settings['style'] = (array) $opt->style; } - if (isset($opt['notag'])) { - $this->settings['notag'] = (string) $opt['notag']; + if (isset($opt->notag)) { + $this->settings['notag'] = (string) $opt->notag; } - if (isset($opt['tplValues'])) { - $this->settings['tplValues'] = (array) $opt['tplValues']; + if (isset($opt->tplValues)) { + $this->settings['tplValues'] = (array) $opt->tplValues; } - if (isset($opt['pubPages'])) { - $this->settings['pubPages'] = (array) $opt['pubPages']; + if (isset($opt->pubPages)) { + $this->settings['pubPages'] = (array) $opt->pubPages; } }