1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

As Designed Autocomplete error when no results

Discussion in 'Stock Trader Resolved Bug Reports' started by arnaudhc, Feb 25, 2015.

  1. arnaudhc

    arnaudhc New Member

    PHP:
            if(isset($results))
            {
                echo 
    $response json_encode($results);           
            }
            else
            {
                
    $results[$counter] = array(
                    
    "label" => new XenForo_Phrase('nflj_stocktrader_no_results_for_term', array('term' => $term)),
                    
    "value" => ''
                
    );   

                echo 
    $response json_encode($results);
            }
    looks like you are meant to render that phrase otherwise a javascript error is triggered.
    bug also happening on this website
     
  2. arnaudhc

    arnaudhc New Member

    forgot to mention that the 'term' parameter wont work with current definition oh phrase, theres a $ extra
     
  3. Bob

    Bob Developer Staff Member

    This is "As Designed", I just have not removed the ELSE part (which was used for a completely different API at the time. It does no harm the way it is tho and there really is not a need to display something telling a person that no stock information has been found (no results is obvious in this case).

    I'll probably just remove the else part of the statement.
     
  4. arnaudhc

    arnaudhc New Member

    ok thanks
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.