libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Wrap in exists check #78

Closed k1sul1 closed 7 years ago

k1sul1 commented 7 years ago

This class isn't initialized if Polylang doesn't exist, but Polylang doesn't define pll_current_language if there aren't any languages, eg. you have a fresh installation and haven't configured it yet.

Contents of ajax_object when no languages exist: {ajax_url: "https://testitunkki.local/wp-admin/admin-ajax.php", ajax_credentials: "same-origin", lang: null}

Contents of ajax_object when at least one language exists: {ajax_url: "https://testitunkki.local/wp-admin/admin-ajax.php", ajax_credentials: "same-origin", lang: "en"}

anttiviljami commented 7 years ago

Thanks, this is a no-brainer. Just fix the whitespace issue and I'll merge

k1sul1 commented 7 years ago

Fixed. Worthy of a patch release?