mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
Encoding.php - wants [] not {}
This commit is contained in:
parent
ec2ec616b2
commit
bd141346de
2 changed files with 23 additions and 0 deletions
|
@ -37,6 +37,11 @@
|
|||
src: "roles/pbx/templates/71-freepbx-framework.patch"
|
||||
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
|
||||
|
||||
- name: FreePBX - Patch FreePBX source - wants [] not {}
|
||||
patch:
|
||||
src: "roles/pbx/templates/pbx.patch"
|
||||
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php"
|
||||
|
||||
- name: FreePBX - Disable & Stop asterisk service
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
|
18
roles/pbx/templates/pbx.patch
Normal file
18
roles/pbx/templates/pbx.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- /opt/iiab/freepbx/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php.orig 2020-08-24 08:52:41.291376894 +0000
|
||||
+++ /opt/iiab/freepbx/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php 2020-08-24 08:55:36.429818838 +0000
|
||||
@@ -193,11 +193,11 @@
|
||||
|
||||
$buf = "";
|
||||
for($i = 0; $i < $max; $i++){
|
||||
- $c1 = $text{$i};
|
||||
+ $c1 = $text[$i];
|
||||
if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already
|
||||
- $c2 = $i+1 >= $max? "\x00" : $text{$i+1};
|
||||
- $c3 = $i+2 >= $max? "\x00" : $text{$i+2};
|
||||
- $c4 = $i+3 >= $max? "\x00" : $text{$i+3};
|
||||
+ $c2 = $i+1 >= $max? "\x00" : $text[$i+1];
|
||||
+ $c3 = $i+2 >= $max? "\x00" : $text[$i+2];
|
||||
+ $c4 = $i+3 >= $max? "\x00" : $text[$i+3];
|
||||
if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8
|
||||
if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already
|
||||
$buf .= $c1 . $c2;
|
Loading…
Reference in a new issue