Skip to content

Commit d0d320e

Browse files
committed
Minor PHP8.1 compatibility fix.
1 parent f5a27bc commit d0d320e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
7979
[2022.03.11; Bug-fix; Maikuolan]: Shorthand data was quoted, but needed to be defined as literals in order to avoid being unentitised prior to being parsed as regular expression partials, in order to avoid breaking those expressions and potentially triggering fatal errors; Fixed.
8080

8181
[2022.03.24; Bug-fix; Maikuolan]: Fixed a bottleneck in the scan process caused by the readFileBlocks method (phpMussel/phpMussel#231).
82+
83+
### v3.3.3
84+
85+
[2022.06.16; Bug-fix; Maikuolan]: Warning generated since PHP 8.1 for parse functionality; Fixed.

src/Loader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The loader (last modified: 2022.03.25).
11+
* This file: The loader (last modified: 2022.06.16).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -707,7 +707,7 @@ public function parse(array $Needles, string $Haystack): string
707707
return '';
708708
}
709709
foreach ($Needles as $Key => $Value) {
710-
if (!is_array($Value)) {
710+
if (!is_array($Value) && $Value !== null) {
711711
$Haystack = str_replace('{' . $Key . '}', $Value, $Haystack);
712712
}
713713
}

0 commit comments

Comments
 (0)