Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60391

PHP7.2 Patch bennu library for PHP 7.2. compatibility

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Libraries
    • Labels:

      Description

      one single place where bennu uses function create_function that was deprecated in php 7.2

      diff --git a/lib/bennu/iCalendar_properties.php b/lib/bennu/iCalendar_properties.php
      index 260c42a..6a7a562 100644
      --- a/lib/bennu/iCalendar_properties.php
      +++ b/lib/bennu/iCalendar_properties.php
      @@ -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
      

      bennu itself seems long asleep http://bennu.sourceforge.net/

        Attachments

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            Mark Nelson
            Integrator:
            Jun Pataleta
            Tester:
            Jun Pataleta
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Nov/17