e107inc/e107

View on GitHub
e107_handlers/search_class.php

Summary

Maintainability
A
35 mins
Test Coverage
F
5%

Method parsesearch has 8 arguments (exceeds 7 allowed). Consider refactoring.
Open

    public function parsesearch($table, $return_fields, $search_fields, $weights, $handler, $no_results, $where, $order)
Severity: Major
Found in e107_handlers/search_class.php - About 35 mins to fix

    Variable $field_query was undeclared, but array fields are being added to it.
    Open

                    $field_query[] = "MATCH(".$field.") AGAINST ('".$this -> query."' IN BOOLEAN MODE)";
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $crop_fields was undeclared, but array fields are being added to it.
    Open

                        $crop_fields[] = preg_replace('/(.*?)\./', '', $field);
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Argument 2 (needle) is ' ' but \e_parse::ustrpos() takes int defined at /code/e107_handlers/e_parse_class.php:412
    Open

                    $this -> keywords['exact'][$k_key] = $tp->ustrpos($key, ' ') !== false;
    Severity: Minor
    Found in e107_handlers/search_class.php by phan

    Variable $ps was undeclared, but array fields are being added to it.
    Open

            if ($ps['results'] = $sql->gen($sql_query)) 
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $output_array was undeclared, but array fields are being added to it.
    Open

                        $output_array['text'][] = "<li>".str_replace('{DETAILS}',"<span class='text-muted'>".$res['detail'].$display_rel."</span>", $output).$tp->toText($res['post_summary'])."</div></li>\n\n";
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $display_row was undeclared, but array fields are being added to it.
    Open

                        $display_row[] = $qrow[$i];
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $search_query was undeclared, but array fields are being added to it.
    Open

                    $search_query[] = "(". varset($weights[$field_key],0.6)." * (MATCH(".$field.") AGAINST ('".str_replace(" ","+",$this -> query)."' IN BOOLEAN MODE)))";
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $qrow was undeclared, but array fields are being added to it.
    Open

                            $qrow[$x][$r_key] = $r_value;
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Variable $sortarr was undeclared, but array fields are being added to it.
    Open

                        $sortarr[] = $info['relevance'];
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Argument 2 (start) is float but \e_parse::usubstr() takes int defined at /code/e107_handlers/e_parse_class.php:482
    Open

                    $this -> text = "...".$tp->usubstr($this -> text, ($this -> pos - round(($search_chars / 3))), $search_chars)."...";
    Severity: Minor
    Found in e107_handlers/search_class.php by phan

    Variable $display_row was undeclared, but array fields are being added to it.
    Open

                        $display_row[] = $row;
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Reference to undeclared property \e_db->total_results
    Open

                $ps['results'] = $sql->total_results;        // db class reads result of SELECT FOUND_ROWS() for us
    Severity: Minor
    Found in e107_handlers/search_class.php by phan

    Variable $endweight is undeclared
    Open

                                    else if (!$endweight)
    Severity: Minor
    Found in e107_handlers/search_class.php by phan

    Variable $exact_query was undeclared, but array fields are being added to it.
    Open

                    $exact_query[] = $query;
    Severity: Info
    Found in e107_handlers/search_class.php by phan

    Argument 2 (needle) is string but \e_parse::ustrpos() takes int defined at /code/e107_handlers/e_parse_class.php:412
    Open

                    if ($tp->ustrpos($stopword_list, '|'.$key.'|') !== FALSE) {
    Severity: Minor
    Found in e107_handlers/search_class.php by phan

    There are no issues that match your filters.

    Category
    Status