From 298762c8b9b11ae595c247425f022ac57516ebaa Mon Sep 17 00:00:00 2001 From: fritzmg Date: Tue, 1 Nov 2022 12:58:18 +0000 Subject: [PATCH] fix PHP 8 issue --- system/modules/sharebuttons/classes/ShareButtons.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/modules/sharebuttons/classes/ShareButtons.php b/system/modules/sharebuttons/classes/ShareButtons.php index 18c2c41..f278144 100644 --- a/system/modules/sharebuttons/classes/ShareButtons.php +++ b/system/modules/sharebuttons/classes/ShareButtons.php @@ -38,6 +38,10 @@ public static function createShareButtons($networks, $theme = self::DEFAULT_THEM // access to page global $objPage; + if (!$objPage) { + return ''; + } + // try to deserialize if( is_string( $networks ) ) $networks = StringUtil::deserialize( $networks );