Title: PHP Warning: in_array() expects parameter 2 to be array
Last modified: September 5, 2021

---

# PHP Warning: in_array() expects parameter 2 to be array

 *  Resolved [frankayala16](https://wordpress.org/support/users/frankayala16/)
 * (@frankayala16)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/)
 * Hello,
 * I have detected the following errors in my error.log, any idea how to fix it?
 *     ```
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 8
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 9
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 10
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 11
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 12
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 13
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 14
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 15
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 16
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 17
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 18
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 19
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 20
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 21
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 22
       [03-Sep-2021 20:44:58 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in /home/x/public_html/wp-content/plugins/ultimate-post/blocks/template/meta.php on line 23
       ```
   
 * thanks for the help…

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

 *  Plugin Contributor [Anik Biswas](https://wordpress.org/support/users/anik4e/)
 * (@anik4e)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14845849)
 * Hello [@frankayala16](https://wordpress.org/support/users/frankayala16/),
    I 
   check that issue in my site bu it working well.
 * Problem shows in that line-
 * > [View post on imgur.com](https://imgur.com/a/caOt3NM)
 * I need some more information about it.
    Does this error show on your sites frontend?
   Which block are you using? Which version of PostX are you using? Thanks.
 *  Thread Starter [frankayala16](https://wordpress.org/support/users/frankayala16/)
 * (@frankayala16)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14851182)
 * no, apparently this error is not appearing in the frontend of my site, but it
   is increasing the weight of my error.log
 * I am using version 2.4.11, i am using classic post grid block, mention i use 
   mai law pro theme.
 * by the way, I can’t see the image you attached 🙁
 * thanks for the help
 *  Plugin Contributor [Anik Biswas](https://wordpress.org/support/users/anik4e/)
 * (@anik4e)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14853095)
 * Hello [@frankayala16](https://wordpress.org/support/users/frankayala16/),
    I 
   found the bug, its a minor bug and i already fixed it on my localhost. We will
   fix this in next update. Next update will release soon.
 * Specially thank you very much for your bug notice. Without your notice maybe 
   we will not found the bug.
 * Thank you very much.
 *  Thread Starter [frankayala16](https://wordpress.org/support/users/frankayala16/)
 * (@frankayala16)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14855929)
 * Okay, thank you very much for your help!
    good day
 *  Plugin Author [WPXPO](https://wordpress.org/support/users/wpxpo/)
 * (@wpxpo)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14893400)
 * Hello [@frankayala16](https://wordpress.org/support/users/frankayala16/),
    We
   fix your bug in this update. Please check version 2.4.12.
 * If you satisfied with our plugin please give us your valuable review.
    Thanks.

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

The topic ‘PHP Warning: in_array() expects parameter 2 to be array’ is closed to
new replies.

 * ![](https://ps.w.org/ultimate-post/assets/icon-256x256.gif?rev=2540610)
 * [Post Grid Gutenberg Blocks for News, Magazines, Blog Websites - PostX](https://wordpress.org/plugins/ultimate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-post/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [WPXPO](https://wordpress.org/support/users/wpxpo/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-3/#post-14893400)
 * Status: resolved