Skip to content

Commit

Permalink
Merge pull request #6 from nath99/php-8-1-fix
Browse files Browse the repository at this point in the history
Fix (PHP 8.1 upgrade) stop null value being passed to preg_replace_callback
  • Loading branch information
nyeholt authored Mar 5, 2023
2 parents 7021032 + 9d58419 commit 50f70b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Exension/FileLinkReplaceExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function ($val) {
// $val[1] - the file_link id, eg: 12
$this->fileIdsTmp[] = $val[1];
},
$value
$value ?? ''
);
}

Expand Down Expand Up @@ -91,8 +91,8 @@ function ($val) use ($fileMap) {
return $element
->renderWith(
[
["type" => "Symbiote/ContentReplace", 'WYSIWYGFileLink'],
["type" => "Includes", 'WYSIWYGFileLink']
["type" => "Symbiote/ContentReplace", 'WYSIWYGFileLink'],
["type" => "Includes", 'WYSIWYGFileLink']
]
)
->RAW();
Expand Down

0 comments on commit 50f70b6

Please sign in to comment.