Skip to content

Commit

Permalink
[util] stringToArray: if string is null we should return with empty a…
Browse files Browse the repository at this point in the history
…rray
  • Loading branch information
connorhu committed Dec 20, 2023
1 parent da40bd0 commit df9f81e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/util/sfToolkit.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ public static function arrayDeepMerge()
*/
public static function stringToArray($string)
{
if ($string === null) {
return [];
}

preg_match_all('/
\s*((?:\w+-)*\w+) # key \\1
\s*=\s* # =
Expand Down

0 comments on commit df9f81e

Please sign in to comment.