From 19ad1ce44c7c463b223777c213a2abbc1c5c2f64 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 8 Dec 2015 12:47:15 +0800 Subject: [PATCH] MDL-52361 core: patch Horde library for PHP7 compatibility --- lib/horde/framework/Horde/Imap/Client/Socket.php | 4 ++-- lib/horde/readme_moodle.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/horde/framework/Horde/Imap/Client/Socket.php b/lib/horde/framework/Horde/Imap/Client/Socket.php index 0b3b6ab4527..a60b72a2b0f 100644 --- a/lib/horde/framework/Horde/Imap/Client/Socket.php +++ b/lib/horde/framework/Horde/Imap/Client/Socket.php @@ -3245,7 +3245,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base if (is_string($val)) { // These entries are text fields. - $ret->$env_data[$key] = substr($val, 0, $env_str); + $ret->{$env_data[$key]} = substr($val, 0, $env_str); } else { // These entries are address structures. $group = null; @@ -3287,7 +3287,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base } } - $ret->$env_data[$key] = $tmp; + $ret->{$env_data[$key]} = $tmp; } ++$key; diff --git a/lib/horde/readme_moodle.txt b/lib/horde/readme_moodle.txt index 3fe916bedb9..27435620ab3 100644 --- a/lib/horde/readme_moodle.txt +++ b/lib/horde/readme_moodle.txt @@ -8,6 +8,7 @@ Description of import of Horde libraries # Copy the following script and store it on /tmp, change it's execute bit, and run it, passing in your path to Horde (the directory you've cloned the repository): /tmp/copyhorde.sh ~/git/ext/horde/ +# MDL-52361 patched for PHP7 compatibility, after upgrade make sure it's updated upstream and remove this line ==== #!/bin/sh