WebUI: Mail not displayed due to PHP error when using wildcards in search terms

Issue #595 resolved
ercpe created an issue
  1. Search for something like subject: *foo*
  2. Select a mail from the results pane
  3. The mail is not displayed due to PHP errors which adds the highlighting CSS:
PHP Warning:  preg_replace(): Compilation failed: nothing to repeat at offset 0 in ..../htdocs/model/search/message.php on line 516
PHP Warning:  preg_replace(): Compilation failed: nothing to repeat at offset 0 in ..../htdocs/model/search/message.php on line 493

Works fine when searching for subject: foo

Comments (3)

  1. Janos SUTO repo owner

    A few lines above (~499) you can see the following:

    if($v) { array_push($terms, $v); }
    

    Try to fix it like

    $v = preg_replace("/\*/", "", $v);
    if($v) { array_push($terms, $v); }
    
  2. Log in to comment