From 1f40453ff47133bcce13dbc93422fa784e8821f4 Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Tue, 3 May 2022 11:30:07 -0600 Subject: [PATCH] Avoid errors if a null value is passed to censorText() Signed-off-by: Jon Stovell --- Sources/Load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Load.php b/Sources/Load.php index cdaf111466..22318dbbaf 100644 --- a/Sources/Load.php +++ b/Sources/Load.php @@ -3381,7 +3381,7 @@ function censorText(&$text, $force = false) global $modSettings, $options, $txt; static $censor_vulgar = null, $censor_proper; - if ((!empty($options['show_no_censored']) && !empty($modSettings['allow_no_censored']) && !$force) || empty($modSettings['censor_vulgar']) || trim($text) === '') + if ((!empty($options['show_no_censored']) && !empty($modSettings['allow_no_censored']) && !$force) || empty($modSettings['censor_vulgar']) || !is_string($text) || trim($text) === '') return $text; call_integration_hook('integrate_word_censor', array(&$text));