Ver Fonte

Verify that concat_hook_function actually returned something before writing over string.

indiri69 há 21 anos atrás
pai
commit
fe990f0951
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      functions/display_messages.php

+ 4 - 1
functions/display_messages.php

@@ -126,7 +126,10 @@ function error_box($string, $color) {
 
     $err = _("ERROR");
 
-    $string = concat_hook_function('error_box', $string);
+    $ret = concat_hook_function('error_box', $string);
+    if($ret != '') {
+        $string = $ret;
+    }
 
     /* check if the page header has been sent; if not, send it! */
     if(!isset($pageheader_sent) && !$pageheader_sent) {