File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1111 matrix :
1212 operating-system : ['ubuntu-latest']
1313 php-versions :
14+ - ' 8.4'
15+ - ' 8.3'
1416 - ' 8.2'
1517 - ' 8.1'
1618 - ' 8.0'
Original file line number Diff line number Diff line change @@ -60,10 +60,16 @@ public static function inherit(HTMLPurifier_Config $config)
6060
6161 /**
6262 * @param HTMLPurifier_ConfigSchema $schema
63- * @param HTMLPurifier_PropertyList $parent OPTIONAL
63+ * @param HTMLPurifier_PropertyList|null $parent OPTIONAL
6464 */
65- public function __construct (HTMLPurifier_ConfigSchema $ schema , HTMLPurifier_PropertyList $ parent = null )
65+ public function __construct (HTMLPurifier_ConfigSchema $ schema , $ parent = null )
6666 {
67+ if ($ parent && !$ parent instanceof HTMLPurifier_PropertyList) {
68+ throw new InvalidArgumentException (
69+ 'Argument #2 ($parent) passed to ' . __METHOD__ . '() must be an instance of HTMLPurifier_PropertyList or null '
70+ );
71+ }
72+
6773 // ensure 'HTML5' is among allowed 'HTML.Doctype' values
6874 $ doctypeConfig = $ schema ->info ['HTML.Doctype ' ];
6975
You can’t perform that action at this time.
0 commit comments