Skip to content

Commit

Permalink
avoid warning in formText when no text is given
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Jan 31, 2023
1 parent d9a7912 commit a46a37e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/common.php
Expand Up @@ -1028,7 +1028,7 @@ function cleanText($text) {
* @return string
*/
function formText($text) {
$text = str_replace("\012", "\015\012", $text);
$text = str_replace("\012", "\015\012", $text ?? '');
return htmlspecialchars($text);
}

Expand Down

0 comments on commit a46a37e

Please sign in to comment.