mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 05:37:49 +02:00
feat: PHP 8.4 support (#441)
This commit is contained in:
@@ -264,9 +264,8 @@ class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition
|
||||
if (isset($this->info_content_sets['Block'][$block_wrapper])) {
|
||||
$this->info_block_wrapper = $block_wrapper;
|
||||
} else {
|
||||
trigger_error(
|
||||
'Cannot use non-block element as block wrapper',
|
||||
E_USER_ERROR
|
||||
throw new Exception(
|
||||
'Cannot use non-block element as block wrapper'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -276,11 +275,7 @@ class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition
|
||||
$this->info_parent = $parent;
|
||||
$this->info_parent_def = $def;
|
||||
} else {
|
||||
trigger_error(
|
||||
'Cannot use unrecognized element as parent',
|
||||
E_USER_ERROR
|
||||
);
|
||||
$this->info_parent_def = $this->manager->getElement($this->info_parent, true);
|
||||
throw new Exception('Cannot use unrecognized element as parent');
|
||||
}
|
||||
|
||||
// support template text
|
||||
|
Reference in New Issue
Block a user