MDL-60391 libraries: patch bennu for php 7.2

This commit is contained in:
Marina Glancy 2017-10-13 16:41:29 +08:00
parent d8e9a23c48
commit 9016f772ce
2 changed files with 5 additions and 1 deletions

View file

@ -107,7 +107,10 @@ class iCalendar_property {
$valarray = explode('\\,', $this->value);
// Undo transparent formatting
$replace_function = create_function('$a', 'return rfc2445_undo_value_formatting($a, '.$this->val_type.');');
$valtype = $this->val_type;
$replace_function = function($a) use ($valtype) {
return rfc2445_undo_value_formatting($a, $valtype);
};
$valarray = array_map($replace_function, $valarray);
// Now, if this property cannot have multiple values, don't return as an array

View file

@ -9,3 +9,4 @@ modifications:
6/ MDL-49032: fixed rfc2445_fold() to fix incorrect RFC2445_WSP definition (16 Sep 2015)
7/ added timestamp_to_date function to support zero duration events (16 Sept 2015)
8/ Updated \iCalendar_event::invariant_holds() to allow for same dtstart and dtend timestamps (13 July 2017)
9/ MDL-60391: replace create_function() with lambda function for PHP 7.2 compatibility (13 Oct 2017)