Skip to content

Commit 910a5af

Browse files
authored
Merge pull request hestiacp#814 from hestiacp/bugfix-roundcube-php7.4
Roundcube fixes for PHP 7.4 compatibility
2 parents 721e257 + 3b1f9d3 commit 910a5af

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
33

44
## [CURRENT] - Development
55
### Features
6-
- Added support for configuring individual TTL per DNS record. Thanks to @jaapmarcus
6+
- Added support for configuring individual TTL per DNS record. Thanks to @jaapmarcus!
77
- Added support for Ubuntu Server 20.04 LTS.
88
- Added the ability to set the php cli version per user (using alias).
99

@@ -26,8 +26,9 @@ All notable changes to this project will be documented in this file.
2626
- Rework busy port validation in v-change-sys-port.
2727
- Fixed ssh config save bug when edit the over interface.
2828
- Fixed different permission issues on user restore.
29-
- Stop trying to renew LE certs after multiple consecutive failed attempts. Thanks @dpeca
29+
- Stop trying to renew LE certs after multiple consecutive failed attempts. Thanks to @dpeca!
3030
- Implement a validation function to verify the correct version in hestia.conf prior to install a new one.
31+
- Roundcube fixes for PHP 7.4 compatibility.
3132

3233
## [1.1.1] - 2020-03-24 - Hotfix
3334
### Features

install/hst-install-debian.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,15 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
15791579
fi
15801580
fi
15811581
fi
1582+
1583+
# Fixes for PHP 7.4 compatibility
1584+
sed -i 's/\"\\n\", $identities/$identities, \"\\n\"/g' /usr/share/roundcube/plugins/enigma/lib/enigma_ui.php
1585+
sed -i 's/(array_keys($post_search), \x27|\x27)/(\x27|\x27, array_keys($post_search))/g' /usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php
1586+
sed -i 's/implode($name, \x27.\x27)/implode(\x27.\x27, $name)/g' /usr/share/roundcube/program/lib/Roundcube/rcube_db.php
1587+
sed -i 's/$fields, \x27,\x27/',', $fields/g' /usr/share/roundcube/program/steps/addressbook/search.inc
1588+
sed -i 's/implode($fields, \x27,\x27)/implode(\x27,\x27, $fields)/g' /usr/share/roundcube/program/steps/addressbook/search.inc
1589+
sed -i 's/implode($bstyle, \x27; \x27)/implode(\x27; \x27, $bstyle)/g' /usr/share/roundcube/program/steps/mail/sendmail.inc
1590+
15821591
# Configure webmail alias
15831592
echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
15841593

install/hst-install-ubuntu.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,14 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
15251525
sed -i "s/localhost/$servername/g" /etc/roundcube/plugins/password/config.inc.php
15261526
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
15271527

1528+
# Fixes for PHP 7.4 compatibility
1529+
sed -i 's/\"\\n\", $identities/$identities, \"\\n\"/g' /usr/share/roundcube/plugins/enigma/lib/enigma_ui.php
1530+
sed -i 's/(array_keys($post_search), \x27|\x27)/(\x27|\x27, array_keys($post_search))/g' /usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php
1531+
sed -i 's/implode($name, \x27.\x27)/implode(\x27.\x27, $name)/g' /usr/share/roundcube/program/lib/Roundcube/rcube_db.php
1532+
sed -i 's/$fields, \x27,\x27/',', $fields/g' /usr/share/roundcube/program/steps/addressbook/search.inc
1533+
sed -i 's/implode($fields, \x27,\x27)/implode(\x27,\x27, $fields)/g' /usr/share/roundcube/program/steps/addressbook/search.inc
1534+
sed -i 's/implode($bstyle, \x27; \x27)/implode(\x27; \x27, $bstyle)/g' /usr/share/roundcube/program/steps/mail/sendmail.inc
1535+
15281536
# Configure webmail alias
15291537
echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
15301538

install/upgrade/versions/latest.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,13 @@ if [ "$WEB_SYSTEM" = "apache2" ] && [ ! -e "/etc/apt/sources.list.d/apache2.list
2828
fi
2929
fi
3030
fi
31+
32+
# Roundcube fixes for PHP 7.4 compatibility
33+
if [ -d /usr/share/roundcube ]; then
34+
sed -i 's/\"\\n\", $identities/$identities, \"\\n\"/g' /usr/share/roundcube/plugins/enigma/lib/enigma_ui.php
35+
sed -i 's/(array_keys($post_search), \x27|\x27)/(\x27|\x27, array_keys($post_search))/g' /usr/share/roundcube/program/lib/Roundcube/rcube_contacts.php
36+
sed -i 's/implode($name, \x27.\x27)/implode(\x27.\x27, $name)/g' /usr/share/roundcube/program/lib/Roundcube/rcube_db.php
37+
sed -i 's/$fields, \x27,\x27/',', $fields/g' /usr/share/roundcube/program/steps/addressbook/search.inc
38+
sed -i 's/implode($fields, \x27,\x27)/implode(\x27,\x27, $fields)/g' /usr/share/roundcube/program/steps/addressbook/search.inc
39+
sed -i 's/implode($bstyle, \x27; \x27)/implode(\x27; \x27, $bstyle)/g' /usr/share/roundcube/program/steps/mail/sendmail.inc
40+
fi

0 commit comments

Comments
 (0)