Fix for AJAX requests
-
Hello,
Thank you for the great plugin !
I am making AJAX request to one of my pages, and Polylang is throwing an error in choose-lang.php:l54
The problem is that in calls to set_language() via AJAX, the $curlang parameter is false. on line 54 this is a problem and I get an error. Please consider the following lines to fix this :
choose-lang:l48
// don't set the language a second time (and don't set a null language) if (isset($this->curlang) || !$curlang) return;
As you can see I have added a second check to the if control. The only side effect of this code would be if it is necessary somewhere to be able to set a null language, but I have experienced no problems with this fix for the moment.
– Robin Lambell
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Fix for AJAX requests’ is closed to new replies.