From 74c851c5a72e95ebb2052a66f1e6e10256936076 Mon Sep 17 00:00:00 2001 From: Meirza Date: Mon, 8 May 2023 09:55:27 +0700 Subject: [PATCH] MDL-78143 lib: Added class properties in html purifier In PHP 8.2 and later, setting a value to an undeclared class property is deprecated and emits a deprecation notice. So we need to add missing class properties that still need to be declared. --- lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php | 5 +++++ lib/htmlpurifier/readme_moodle.txt | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php b/lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php index 33ae11397e5..4c3ce1758e0 100644 --- a/lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php +++ b/lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php @@ -32,6 +32,11 @@ class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer */ protected $compress = false; + /** + * @var HTMLPurifier_Config + */ + protected $genConfig; + /** * @param string $name Form element name for directives to be stuffed into * @param string $doc_url String documentation URL, will have fragment tagged on diff --git a/lib/htmlpurifier/readme_moodle.txt b/lib/htmlpurifier/readme_moodle.txt index 59d0138a794..d58010fb93b 100644 --- a/lib/htmlpurifier/readme_moodle.txt +++ b/lib/htmlpurifier/readme_moodle.txt @@ -14,3 +14,7 @@ Description of HTML Purifier library import into Moodle HTMLPurifier.path.php * add locallib.php with Moodle specific extensions to /lib/htmlpurifier/ * add this readme_moodle.txt to /lib/htmlpurifier/ + +Local changes: +* 2023-06-06 Applied patch https://github.com/ezyang/htmlpurifier/pull/346 to avoid PHP 8.2 deprecations. + See MDL-78143 for more details. \ No newline at end of file