Title: PHP error in get_flag_by_language
Last modified: August 22, 2016

---

# PHP error in get_flag_by_language

 *  Resolved [Ross t](https://wordpress.org/support/users/rtweedie/)
 * (@rtweedie)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-error-in-get_flag_by_language/)
 * After upgrading to version 2.1.1 of MultiLingual Press I’m receiving PHP errors
   regarding changes in the API:
 * Warning: strtok() expects parameter 1 to be string, array given in /Users/rtweedie/
   Sites/bv-2014/wordpress/content/plugins/multilingual-press/inc/core/language-
   api/Mlp_Language_Api.php on line 286
 * It looks like the languages are being stored as an array and so the string tokeniser
   function is having problems.
 * Should this be added to github as an issue followed by a pull request?
 * I’m using PHP 5.6 on Mac OS X 10.9.5.
 * [https://wordpress.org/plugins/multilingual-press/](https://wordpress.org/plugins/multilingual-press/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [fuxia](https://wordpress.org/support/users/thefuxia/)
 * (@thefuxia)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-error-in-get_flag_by_language/#post-5365810)
 * Strange, that shouldn’t be possible. There are just two places where this method
   is used, and both times we pass a string.
 * Our public GitHub repository is currently just a mirror of the private pro repo.
   We cannot accept pull requests there. But if you have an idea for a solution 
   or a way to reproduce the problem let me know.
 *  Thread Starter [Ross t](https://wordpress.org/support/users/rtweedie/)
 * (@rtweedie)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-error-in-get_flag_by_language/#post-5365982)
 * Thanks for the reply Toscho. I think we were doing something strange with the
   plugin. If it reoccurs I’ll be able to provide more details 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP error in get_flag_by_language’ is closed to new replies.

 * ![](https://ps.w.org/multilingual-press/assets/icon-256x256.png?rev=2188271)
 * [MultilingualPress](https://wordpress.org/plugins/multilingual-press/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multilingual-press/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multilingual-press/)
 * [Active Topics](https://wordpress.org/support/plugin/multilingual-press/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multilingual-press/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multilingual-press/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ross t](https://wordpress.org/support/users/rtweedie/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/php-error-in-get_flag_by_language/#post-5365982)
 * Status: resolved