Skip to content

Commit df9f81e

Browse files
committed
[util] stringToArray: if string is null we should return with empty array
1 parent da40bd0 commit df9f81e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/util/sfToolkit.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ public static function arrayDeepMerge()
245245
*/
246246
public static function stringToArray($string)
247247
{
248+
if ($string === null) {
249+
return [];
250+
}
251+
248252
preg_match_all('/
249253
\s*((?:\w+-)*\w+) # key \\1
250254
\s*=\s* # =

0 commit comments

Comments
 (0)