MDL-67115 htmlpurifier: php74 params order for implode()
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 19 Jan 2020 17:23:11 +0000 (18:23 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 19 Jan 2020 17:47:28 +0000 (18:47 +0100)
Passing parameters to implode() in reverse order is deprecated, use
implode($glue, $parts) instead of implode($parts, $glue).

This commit corresponds to general search of wrong cases.

lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php
lib/htmlpurifier/readme_moodle.txt

index 679d19b..c18cd95 100644 (file)
@@ -43,8 +43,8 @@ class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
         $ret .= $this->element('caption', 'Doctype');\r
         $ret .= $this->row('Name', $doctype->name);\r
         $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No');\r
-        $ret .= $this->row('Default Modules', implode($doctype->modules, ', '));\r
-        $ret .= $this->row('Default Tidy Modules', implode($doctype->tidyModules, ', '));\r
+        $ret .= $this->row('Default Modules', implode(', ', $doctype->modules));\r
+        $ret .= $this->row('Default Tidy Modules', implode(', ', $doctype->tidyModules));\r
         $ret .= $this->end('table');\r
         return $ret;\r
     }\r
index 1195367..d0f7604 100644 (file)
@@ -21,3 +21,5 @@ Modifications:
   Check status of https://github.com/ezyang/htmlpurifier/pull/148
 * MDL-67030 applied https://github.com/ezyang/htmlpurifier/pull/224 towards
   php74 compatibility.
+* MDL-67115 applied https://github.com/ezyang/htmlpurifier/pull/243 towards
+  php74 compatibility.