From de06fbaebb719b0d953fef5be99093b46d4e8bdb Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 29 Jan 2021 10:03:16 -0500 Subject: [PATCH] wordpress theme: Fix PHP deprecation This fixes errors which looked like this: "PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /opt/webapps/wordpress-5.6/wordpress/wp-content/themes/aclindsa/functions.php on line 117 --- aclindsa-wordpress-theme/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aclindsa-wordpress-theme/functions.php b/aclindsa-wordpress-theme/functions.php index d2968e1..a89f28f 100644 --- a/aclindsa-wordpress-theme/functions.php +++ b/aclindsa-wordpress-theme/functions.php @@ -114,8 +114,8 @@ function kubrick_add_theme_page() { update_option('kubrick_header_color', $fontcolor); } if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) { - $uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0]; - $lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0]; + $uc = ( strlen($uc[0]) == 3 ) ? $uc[0][0].$uc[0][0].$uc[0][1].$uc[0][1].$uc[0][2].$uc[0][2] : $uc[0]; + $lc = ( strlen($lc[0]) == 3 ) ? $lc[0][0].$lc[0][0].$lc[0][1].$lc[0][1].$lc[0][2].$lc[0][2] : $lc[0]; update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc"); }