Skip to content

Commit

Permalink
Fix some PHP 8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Jan 19, 2025
1 parent a0be805 commit f472ef1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class serendipity_event_textile extends serendipity_event
{
var $title = PLUGIN_EVENT_TEXTILE_NAME;
var $markup_elements = [];

function introspect(&$propbag)
{
Expand Down Expand Up @@ -149,7 +150,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null)

$blocks = array();
foreach($preserve_tags as $tag) {
if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element] ?? null, $matches )) {
if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element] ?? '', $matches )) {
foreach($matches[1] as $match) {
$blocks[] = $match;
}
Expand Down

0 comments on commit f472ef1

Please sign in to comment.