From 7a0ae7f0f8f2a6908b626f48ec021443df693ae2 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Wed, 19 Apr 2023 10:16:04 +0300 Subject: [PATCH] - fixed PHP8.2 compatibility; --- composer.json | 8 ++++++++ includes/core/class-profile.php | 5 +++++ includes/core/um-filters-profile.php | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 994e1a1f..e309c5c1 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,14 @@ "minimum-stability": "stable", "prefer-stable": true, "require": { + "ext-mbstring": "*", + "ext-json": "*", + "ext-dom": "*", + "ext-exif": "*", + "ext-gd": "*", + "ext-fileinfo": "*", + "ext-curl": "*", + "ext-iconv": "*", "woocommerce/action-scheduler": "3.2.1" }, "require-dev": { diff --git a/includes/core/class-profile.php b/includes/core/class-profile.php index 21d6196b..506973ca 100644 --- a/includes/core/class-profile.php +++ b/includes/core/class-profile.php @@ -31,6 +31,11 @@ if ( ! class_exists( 'um\core\Profile' ) ) { */ var $active_tab; + /** + * @var null + */ + public $active_subnav = null; + /** * Profile constructor. diff --git a/includes/core/um-filters-profile.php b/includes/core/um-filters-profile.php index f6b6d869..34a7f3d7 100644 --- a/includes/core/um-filters-profile.php +++ b/includes/core/um-filters-profile.php @@ -66,7 +66,7 @@ function um_dynamic_user_profile_title( $title, $id = '' ) { return $title; } - return ( strlen( $title ) !== mb_strlen( $title ) ) ? $title : utf8_encode( $title ); + return ( strlen( $title ) !== mb_strlen( $title ) ) ? $title : mb_convert_encoding( $title, 'UTF-8' ); } add_filter( 'the_title', 'um_dynamic_user_profile_title', 100000, 2 );