Changeset 109631 in spip-zone


Ignore:
Timestamp:
Mar 22, 2018, 2:47:48 PM (16 months ago)
Author:
marcimat@…
Message:

Autre remplacement de create_function en function pour PHP 7.2 (commit oublié).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/safehtml/lib/safehtml/classes/safehtml.php

    r103120 r109631  
    372372                }
    373373
    374                 $tempval = preg_replace_callback('/&#(\d+);?/m', create_function('$m', 'return chr($m[1]);'), $value); //"'
    375                 $tempval = preg_replace_callback('/&#x([0-9a-f]+);?/mi', create_function('$m', 'return chr(hexdec($m[1]));'), $tempval); //"'
     374                $tempval = preg_replace_callback('/&#(\d+);?/m', function($m) { return chr($m[1]); }, $value); //"'
     375                $tempval = preg_replace_callback('/&#x([0-9a-f]+);?/mi', function($m) { return chr(hexdec($m[1])); }, $tempval); //"'
    376376
    377377                if ((in_array($name, $this->protocolAttributes)) &&
Note: See TracChangeset for help on using the changeset viewer.