Changeset 112509 in spip-zone


Ignore:
Timestamp:
Nov 22, 2018, 2:54:31 PM (3 weeks ago)
Author:
kent1@…
Message:

Compat PHP 7.2 create_function deprecated

Location:
_plugins_/yaml/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/yaml/trunk/paquet.xml

    r112287 r112509  
    22        prefix="yaml"
    33        categorie="outil"
    4         version="2.0.9"
     4        version="2.0.10"
    55        etat="test"
    66        compatibilite="[3.0.0;3.2.*]"
  • _plugins_/yaml/trunk/sfyaml/sfYamlInline.php

    r110496 r112509  
    136136      (1 == count($keys) && '0' == $keys[0])
    137137      ||
    138       (count($keys) > 1 && array_reduce($keys, create_function('$v,$w', 'return (integer) $v + (integer) $w;'), 0) == count($keys) * (count($keys) - 1) / 2))
     138        (count($keys) > 1 && array_reduce($keys, function($v,$w) { return (integer) $v + (integer) $w;}, 0) == count($keys) * (count($keys) - 1) / 2))
    139139    {
    140140      $output = array();
     
    227227      $output = str_replace(array('\\"', '\\n', '\\r'), array('"', "\n", "\r"), $output);
    228228          if (strpos($output,'\\x')!==false){
    229                 $output = preg_replace_callback(',\\\\x([0-9a-f]+),', create_function('$m', 'return chr(hexdec($m[1]));'), $output);
     229              $output = preg_replace_callback(',\\\\x([0-9a-f]+),', function($m) {return chr(hexdec($m[1]));}, $output);
    230230          }
    231231    }
Note: See TracChangeset for help on using the changeset viewer.