From 39da78b2588a60a2f43fb8f77448ab9604550978 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 5 Jan 2022 16:25:49 +0200 Subject: Fix some minor PHP 8.1 deprecation warnings --- system/core/Common.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'system/core/Common.php') diff --git a/system/core/Common.php b/system/core/Common.php index 9e23a4ea5..a9b8828e3 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -778,11 +778,9 @@ if ( ! function_exists('_stringify_attributes')) */ function _stringify_attributes($attributes, $js = FALSE) { - $atts = NULL; - if (empty($attributes)) { - return $atts; + return NULL; } if (is_string($attributes)) @@ -792,6 +790,7 @@ if ( ! function_exists('_stringify_attributes')) $attributes = (array) $attributes; + $atts = ''; foreach ($attributes as $key => $val) { $atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'="'.$val.'"'; -- cgit v1.2.3-24-g4f1b