Title: Fatal error
Last modified: April 3, 2026

---

# Fatal error

 *  [chatchat](https://wordpress.org/support/users/chatchat/)
 * (@chatchat)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/fatal-error-4972/)
 * Hello,
 * With this plugin in version 2.0.2, Worpdress 6.8.5, and PHP 8.1.29, I have a 
   fatal error :
 *     ```wp-block-code
       [03-Apr-2026 15:03:41 UTC] PHP Warning:  Undefined variable $existing_not_in in -----/wp-content/plugins/wp-post-hide/includes/classes/class-xswphp-init.php on line 338[03-Apr-2026 15:03:41 UTC] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in -----/wp-content/plugins/wp-post-hide/includes/classes/class-xswphp-init.php:338Stack trace:#0 -----/wp-content/plugins/wp-post-hide/includes/classes/class-xswphp-init.php(338): array_merge()#1 -----/wp-includes/class-wp-hook.php(324): XSWPHP_Init->xswphp_hidden_posts_pages()#2 -----/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#3 -----/wp-includes/plugin.php(565): WP_Hook->do_action()#4 -----/wp-includes/class-wp-query.php(1910): do_action_ref_array()#5 -----/wp-includes/class-wp-query.php(3949): WP_Query->get_posts()#6 -----/wp-includes/post.php(6471): WP_Query->query()#7 -----/wp-includes/post-template.php(726): get_pages()#8 -----/wp-includes/post-template.php(622): get_body_class()#9 -----/wp-content/themes/ldh2018/header.php(53): body_class()#10 -----/wp-includes/template.php(810): require_once('...')#11 -----/wp-includes/template.php(745): load_template()#12 -----/wp-includes/general-template.php(48): locate_template()#13 -----/wp-content/themes/ldh2018/page-en-region.php(1): get_header()#14 -----/wp-includes/template-loader.php(113): include('...')#15 -----/wp-blog-header.php(19): require_once('...')#16 -----/index.php(17): require('...')#17 {main}  thrown in -----/wp-content/plugins/wp-post-hide/includes/classes/class-xswphp-init.php on line 338
       ```
   

Viewing 1 replies (of 1 total)

 *  [awakefield](https://wordpress.org/support/users/awakefield/)
 * (@awakefield)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/fatal-error-4972/#post-18897195)
 * Hi, I’m hitting a very similar issue on anything past version 2.0, I reverted
   back to 1.1.0 and all is safe. On 2.0 or later if I check a box to hide for a
   post that say loads on my home page and I want it hidden I also get the fatal
   error.
 * “Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given
   in ———\wp-content\plugins\wp-post-hide\includes\classes\class-xswphp-init.php:
   393
   Stack trace: 0 ———\wp-content\plugins\wp-post-hide\includes\classes\class-
   xswphp-init.php(393): array_merge(NULL, Array, Array, Array) 1 ———\wp-includes\
   class-wp-hook.php(324): XSWPHP_Init->xswphp_hidden_posts_pages(Object(WP_Query))
   2 ———\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(Object(WP_Query),
   Array) 3 ———\wp-includes\plugin.php(565): WP_Hook->do_action(Array) 4 ———\wp-
   includes\class-wp-query.php(1881): do_action_ref_array(‘pre_get_posts’, Array)
   5 ———\wp-includes\class-wp-query.php(3852): WP_Query->get_posts() 6 C:———\”

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-4972%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-post-hide/assets/icon.svg?rev=2130732)
 * [WP Hide Post — Hide Posts, Pages, Custom Post Types, and Control Products Visibility for WooCommerce](https://wordpress.org/plugins/wp-post-hide/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-post-hide/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-post-hide/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-post-hide/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-post-hide/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-post-hide/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [awakefield](https://wordpress.org/support/users/awakefield/)
 * Last activity: [1 month, 2 weeks ago](https://wordpress.org/support/topic/fatal-error-4972/#post-18897195)
 * Status: not resolved