Skip to content

Commit

Permalink
Fix str_contains passing null when expected str
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Aug 26, 2023
1 parent 65cdfb1 commit 27c00ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.phel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(println x)(php/die))

(defn get-from-list [xs key default & [split]]
(let [arg (find |(php/str_contains $ key) xs)]
(let [arg (find |(php/str_contains (or $ "") key) xs)]
(if (empty? arg)
default
(php/intval (get (php/explode (or split "=") arg) 1)))))

0 comments on commit 27c00ba

Please sign in to comment.