Skip to content

Commit

Permalink
Fixing php 8.2 compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kguptasangoma committed Jun 4, 2024
1 parent de9cb5f commit c558e5f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Superfecta.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ public function ajaxHandler() {
"Curl_Timeout" => $_POST['Curl_Timeout'],
"SPAM_Text" => $_POST['SPAM_Text'],
"SPAM_Text_Substitute" => $_POST['SPAM_Text_Substitute'] == "on" ? 'Y' : 'N',
"processor" => utf8_decode($_POST['processor']),
"multifecta_timeout" => utf8_decode($_POST['multifecta_timeout']),
"processor" => freepbx_utf8_decode($_POST['processor']),
"multifecta_timeout" => freepbx_utf8_decode($_POST['multifecta_timeout']),
"SPAM_threshold" => $_POST['SPAM_threshold'],
"Character_Encodings" => $_POST['Character_Encodings'],
"Strip_Accent_Characters" => $_POST['Strip_Accent_Characters'] == "on" ? 'Y' : 'N',
Expand Down
1 change: 1 addition & 0 deletions includes/processors/superfecta_multi.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

#[\AllowDynamicProperties]
class superfecta_multi extends superfecta_base {

public $name = 'Multi';
Expand Down
1 change: 1 addition & 0 deletions includes/processors/superfecta_single.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

#[\AllowDynamicProperties]
class superfecta_single extends superfecta_base {

public $name = 'Single';
Expand Down
4 changes: 2 additions & 2 deletions includes/superfecta_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,12 @@ function _utf8_decode($string) {
$tmp = $string;
$count = 0;
while ($this->isutf8($tmp)) {
$tmp = utf8_decode($tmp);
$tmp = freepbx_utf8_decode($tmp);
$count++;
}

for ($i = 0; $i < $count - 1; $i++) {
$string = utf8_decode($string);
$string = freepbx_utf8_decode($string);
}
return $string;
}
Expand Down

0 comments on commit c558e5f

Please sign in to comment.