Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter meezohd

    (@meezohd)

    if i delete line 30 and 31 on polylang/frontend/choose-lang.php

    everything seems to work fine !!

    could you please explain what this code does ?

    if (PLL_AJAX_ON_FRONT || false === stripos($_SERVER['SCRIPT_FILENAME'], 'index.php'))
                    $this->set_language(empty($_REQUEST['lang']) ? $this->get_preferred_language() : $this->model->get_language($_REQUEST['lang']));

    Thread Starter meezohd

    (@meezohd)

    just noticed something….
    i think its just a small mistake on line 31 !!

    $this->set_language(empty($_REQUEST['lang']) ? $this->get_preferred_language() : $this->model->get_language($_REQUEST['lang']));

    it should be:

    $this->set_language( empty( $_REQUEST['lang'])) ? $this->get_preferred_language() : $this->model->get_language($_REQUEST['lang'] );

    you forgot to close
    empty( $_REQUEST['lang']

    correct me if i am wrong please !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang and Ajax Live Search’ is closed to new replies.