From 8bcf3cfc0cc89b48e2fd88d769da86cac2b9b301 Mon Sep 17 00:00:00 2001 From: Nabil Kadimi Date: Thu, 25 Jun 2020 22:59:42 +0100 Subject: [PATCH] Fix deprecated code (PHP 7.4) --- includes/sp-formatting-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/sp-formatting-functions.php b/includes/sp-formatting-functions.php index 6845dbb0..463f71e0 100644 --- a/includes/sp-formatting-functions.php +++ b/includes/sp-formatting-functions.php @@ -189,9 +189,9 @@ if ( ! function_exists( 'sp_rgb_from_hex' ) ) { // Convert shorthand colors to full format, e.g. "FFF" -> "FFFFFF" $color = preg_replace( '~^(.)(.)(.)$~', '$1$1$2$2$3$3', $color ); - $rgb['R'] = hexdec( $color{0}.$color{1} ); - $rgb['G'] = hexdec( $color{2}.$color{3} ); - $rgb['B'] = hexdec( $color{4}.$color{5} ); + $rgb['R'] = hexdec( $color[0].$color[1] ); + $rgb['G'] = hexdec( $color[2].$color[3] ); + $rgb['B'] = hexdec( $color[4].$color[5] ); return $rgb; } }