Skip to content

Commit

Permalink
Fix null in str_replace error in PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbj committed Feb 6, 2023
1 parent 0ade820 commit 3468da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DynamicDescriptionNotes.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getModuleInfo() {

return array(
'title' => 'Dynamic Description & Notes',
'version' => '0.1.8',
'version' => '0.1.9',
'summary' => 'Lets you insert PW variables, HTML, and Hanna codes in description and note fields.',
'autoload' => "template=admin",
);
Expand Down Expand Up @@ -139,7 +139,7 @@ private function variablesReplace($text, $p) {
$parts = explode('|', $strReplace[1][0]);
$replacement = str_replace($parts[0], $parts[1], $replacement);
}
$text = str_replace('[page'.$match.']', $replacement, $text);
if($replacement) $text = str_replace('[page'.$match.']', $replacement, $text);
}
return $text;

Expand Down

0 comments on commit 3468da7

Please sign in to comment.