Skip to content

Commit

Permalink
remove utf8_encode() in statistics plugIn for PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrant88 committed Dec 6, 2024
1 parent f03cac4 commit d31bff9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog
- remove/replace utf8_encode() in statistik PlugIn for PHP 8.2

## Version 6.11.2 (2024-07-29)
- autocomplete Plugin is deprecated, use the new subpage instead
Expand Down
2 changes: 1 addition & 1 deletion plugins/stats/images/general_timestats.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

$title = $this->i18n('search_it_stats_general_timestats', 6);
$title = utf8_decode($title);
$title = mb_convert_encoding($title, 'ISO-8859-1', 'UTF-8');

ob_clean();
$plot = new PHPlot(350, 240);
Expand Down
6 changes: 3 additions & 3 deletions plugins/stats/images/rate_success_failure.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
$successCount = $stats->getSuccessCount();

$title = $this->i18n('search_it_stats_rate_success_failure', "\n", $missCount + $successCount);
$title = utf8_decode($title);
$title = mb_convert_encoding($title, 'ISO-8859-1', 'UTF-8');

$lbl_success = $this->i18n('search_it_stats_rate_success_failure_lblsuccess');
$lbl_success = utf8_decode($lbl_success);
$lbl_success = mb_convert_encoding($lbl_success, 'ISO-8859-1', 'UTF-8');

$lbl_miss = $this->i18n('search_it_stats_rate_success_failure_lblmiss');
$lbl_miss = utf8_decode($lbl_miss);
$lbl_miss = mb_convert_encoding($lbl_miss, 'ISO-8859-1', 'UTF-8');

$data = array(
array('', $successCount, $missCount, '', '')
Expand Down
2 changes: 1 addition & 1 deletion plugins/stats/images/searchterm_timestats.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
),
rex_get('monthcount', 'int')
);
$title = utf8_decode($title);
$title = mb_convert_encoding($title, 'ISO-8859-1', 'UTF-8');


ob_clean();
Expand Down

0 comments on commit d31bff9

Please sign in to comment.