Title: Critical error
Last modified: November 4, 2022

---

# Critical error

 *  [Jola70](https://wordpress.org/support/users/jola70/)
 * (@jola70)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/critical-error-419/)
 * Hello,
 * The plugin generates a critical error.
 * From error log:
    PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($
   value) must be of type Countable|array, null given in /public_html/wp-content/
   plugins/page-restrict-for-woocommerce/admin/partials/page-edit-classic-metabox.
   php:59 Stack trace:` #0 /public_html/wp-content/plugins/page-restrict-for-woocommerce/
   includes/admin/class-classic-metabox-main.php(63): include_once() #1 /public_html/
   wp-admin/includes/template.php(1401): PageRestrictForWooCommerce\Includes\Admin\
   Classic_Metabox_Main->display_metabox() #2 /public_html/wp-admin/includes/post.
   php(2303): do_meta_boxes() #3 /public_html/wp-admin/edit-form-blocks.php(314):
   the_block_editor_meta_boxes() #4 /public_html/wp-admin/post.php(187): require(‘…’)#
   5 {main} thrown in /public_html/wp-content/plugins/page-r” while reading response
   header from upstream, client: xxx, server: xxx, request: “GET /wp-admin/post.
   php?post=7516&action=edit&lang=pl&classic-editor__forget HTTP/2.0”, upstream:“
   fastcgi://unix:/run/php/php8.1-fpm.sock:”, host: “xxx”, referrer: “/wp-admin/
   edit.php?post_type=astra-advanced-hook”
 * Can something be done about it?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Vlado Grcic](https://wordpress.org/support/users/vladogrcic/)
 * (@vladogrcic)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/critical-error-419/#post-16170390)
 * Could you get me more info? Like WC version, WP version, plugin version, is the
   site new, what plugins are changing edit pages and whatever you might think of.
   I’m not really sure what might be the issue. I wasn’t able to recreate the error.
   From the error it seems that you don’t have any product so that’s why you are
   getting that error. However when I remove all products on my side I don’t get
   that error, the select box is just empty.

Viewing 1 replies (of 1 total)

The topic ‘Critical error’ is closed to new replies.

 * ![](https://ps.w.org/page-restrict-for-woocommerce/assets/icon.svg?rev=2274512)
 * [Page Restrict for WooCommerce](https://wordpress.org/plugins/page-restrict-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/page-restrict-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/page-restrict-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/page-restrict-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-restrict-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-restrict-for-woocommerce/reviews/)

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vlado Grcic](https://wordpress.org/support/users/vladogrcic/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/critical-error-419/#post-16170390)
 * Status: not resolved