From 0f1d4a986e497cde79083d5b95fac531f999c6a2 Mon Sep 17 00:00:00 2001 From: "Ilya A. Zhulin" Date: Sat, 25 Nov 2023 00:55:52 +0300 Subject: [PATCH] Update view.html.php Fixing Notices of PHP 8.1 like "**Deprecated**: Passing null to parameter #1 ($string) of type string is deprecated" --- components/com_cck/views/list/view.html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/com_cck/views/list/view.html.php b/components/com_cck/views/list/view.html.php index 233ecc87d..0ed36c28f 100644 --- a/components/com_cck/views/list/view.html.php +++ b/components/com_cck/views/list/view.html.php @@ -52,7 +52,7 @@ protected function prepareDisplay( $preconfig ) $view = $this->getName(); $limitstart = $this->state->get( 'limitstart' ); - $live = urldecode( $params->get( 'live' ) ); + $live = urldecode( $params->get( 'live', '' ) ); $order_by = $params->get( 'order_by', '' ); $variation = $params->get( 'variation' ); @@ -100,10 +100,10 @@ protected function prepareDisplay( $preconfig ) if ( $params->get( 'menu-meta_keywords' ) ) { $this->document->setMetadata( 'keywords', $params->get('menu-meta_keywords' ) ); } - if ( $params->get( 'robots' ) ) { - $this->document->setMetadata( 'robots', $params->get( 'robots' ) ); + if ( strlen(trim($params->get( 'robots', '' ))) > 0 ) { + $this->document->setMetadata( 'robots', $params->get( 'robots', '' ) ); } - $this->pageclass_sfx = htmlspecialchars( $params->get( 'pageclass_sfx' ) ); + $this->pageclass_sfx = htmlspecialchars( $params->get( 'pageclass_sfx', '' ) ); $this->raw_rendering = $params->get( 'raw_rendering', 0 ); // Pagination @@ -303,4 +303,4 @@ protected function prepareDisplay( $preconfig ) } } } -?> \ No newline at end of file +?>