Skip to content

Commit

Permalink
[BUGFIX] Use empty string if config not set
Browse files Browse the repository at this point in the history
Inserting null into intExplode causes Exceptions in TYPO3 v12
  • Loading branch information
linawolf authored and featdd committed Jul 18, 2023
1 parent 29ae0c6 commit 4f961b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Service/ParserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ public function __construct(FrontendInterface $termsCache)
public function pageParser(string $html): string
{
// extract Pids which should be parsed
$parsingPids = GeneralUtility::intExplode(',', $this->settings['parsingPids']);
$parsingPids = GeneralUtility::intExplode(',', $this->settings['parsingPids'] ?? '');
// extract Pids which should NOT be parsed
$excludePids = GeneralUtility::intExplode(',', $this->settings['parsingExcludePidList']);
$excludePids = GeneralUtility::intExplode(',', $this->settings['parsingExcludePidList'] ?? '');
// Get Tags which content should be parsed
$tags = GeneralUtility::trimExplode(',', $this->settings['parsingTags']);
$tags = GeneralUtility::trimExplode(',', $this->settings['parsingTags'] ?? '');
// Remove "a" & "script" from parsingTags if it was added unknowingly
if (in_array(self::$alwaysIgnoreParentTags, $tags, true)) {
$tags = array_diff($tags, self::$alwaysIgnoreParentTags);
Expand Down

0 comments on commit 4f961b7

Please sign in to comment.