Skip to content

Commit ff8055d

Browse files
author
Chris Gårdenberg
committed
fix: Fixes incorrect encoding after PHP 8.1 changing how things work.
fixes #526
1 parent 0df472e commit ff8055d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

PLUGIN-CHECKSUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e29b0dd069aa125c9c8fa6bd4860e8a0
1+
fcd1f5b6a25108d36c45f6eefc1c7ca5

includes/edu-text-functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,8 @@ function get_spots_left( $free_spots, $max_spots, $spot_option = 'exactNumbers',
852852

853853
function get_utf8( $input ) {
854854
$order = array( 'utf-8', 'iso-8859-1', 'iso-8859-15', 'windows-1251' );
855-
if ( 'UTF-8' === mb_detect_encoding( $input, $order, true ) ) {
855+
856+
if ( mb_check_encoding( $input, 'UTF-8' ) ) {
856857
return $input;
857858
}
858859

0 commit comments

Comments
 (0)