Title: Suppress PHP notice by adding this code
Last modified: August 30, 2016

---

# Suppress PHP notice by adding this code

 *  [Fulvio Notarstefano](https://wordpress.org/support/users/nekojira/)
 * (@nekojira)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/suppress-php-notice-by-adding-this-code/)
 * Replace line 476 of `r3df-dashboard-language-switcher.php` with the following:
 *     ```
       $hide_language = false;
       if ( isset( $this->options['hide_language'][ $lang ] ) ) {
       	$hide_language = $this->options['hide_language'][ $lang ];
       }
       if ( $lang != $loc && ! $hide_language ) {
       ```
   
 * currently you are checking the bool value of `$this->options['hide_language'][
   $lang ]` but `$lang` might not be a valid key of that array and this will trigger
   a PHP notice
 * [https://wordpress.org/plugins/r3df-dashboard-language-switcher/](https://wordpress.org/plugins/r3df-dashboard-language-switcher/)

The topic ‘Suppress PHP notice by adding this code’ is closed to new replies.

 * ![](https://ps.w.org/r3df-dashboard-language-switcher/assets/icon-256x256.png?
   rev=1131722)
 * [R3DF Dashboard Language Switcher](https://wordpress.org/plugins/r3df-dashboard-language-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/r3df-dashboard-language-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/r3df-dashboard-language-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/r3df-dashboard-language-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/r3df-dashboard-language-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/r3df-dashboard-language-switcher/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Fulvio Notarstefano](https://wordpress.org/support/users/nekojira/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/suppress-php-notice-by-adding-this-code/)
 * Status: not resolved