Skip to content

Commit

Permalink
Prevent fatal error on null values
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-pike committed Dec 22, 2023
1 parent 61a28ef commit b17fdba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function path_join(...$args) {
* @param integer $escaping method of escaping to use
*/
function out($string, $escaping = ESC_HTML) {
if(is_null($string)) return '';
switch($escaping) {
case ESC_HTML:
echo htmlspecialchars($string);
Expand Down

0 comments on commit b17fdba

Please sign in to comment.