Browse Source

Don't str_replace() on null values

pdontthink 2 years ago
parent
commit
ad802a31a9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      functions/options.php

+ 1 - 1
functions/options.php

@@ -1006,7 +1006,7 @@ function save_option($option) {
 
     // all other widgets except TEXTAREAs should never be allowed to have newlines
     //
-    else if ($option->type != SMOPT_TYPE_TEXTAREA)
+    else if ($option->type != SMOPT_TYPE_TEXTAREA && !empty($option->new_value))
         $option->new_value = str_replace(array("\r", "\n"), '', $option->new_value);