Title: PHP warning
Last modified: July 24, 2021

---

# PHP warning

 *  Resolved [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/)
 * This code:
 *     ```
       if ( function_exists( 'register_block_type' ) ) {
       		register_block_type( 'fatcatapps/easy-pricing-tables',	array(
       			'editor_script' => array( 'fca_ept_editor_script','jquery-ui-dialog' ),
       			'editor_style' => 'fca-ept-editor-style',
       			'style' => array( 'fca-ept-layout1-style', 'fca-ept-layout2-style' ),
       			'render_callback' => 'fca_ept_render',
       		));
       	}
       ```
   
 * is causing this warning to appear in our error log whenever we visit the wp-admin
   editing screen of one of our custom post types:
 * `PHP message: PHP Warning: explode() expects parameter 2 to be string, array 
   given in /home/public_html/wp-includes/class.wp-dependencies.php on line 169`
 * It appears that you’re not allowed to pass an array to `style`.
    -  This topic was modified 4 years, 10 months ago by [pikamander2](https://wordpress.org/support/users/pikamander2/).

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

 *  Thread Starter [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14696027)
 * Based on [this page](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/),
   maybe it’s supposed to be named ‘styles’ instead?
 *  Thread Starter [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14696032)
 * Based on [this page](https://developer.wordpress.org/reference/classes/wp_block_type/),
   it looks like you’re supposed to pass `style` a single string and then you can
   use `styles` to pass additional styles via an array.
 *  Thread Starter [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14696035)
 * `editor_script` also seems to expect a single string. I haven’t seen any warnings/
   errors there yet, but I don’t think you’re supposed to be passing it an array
   either.
 *  Plugin Support [gavinohanlon](https://wordpress.org/support/users/gavinohanlon/)
 * (@gavinohanlon)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14701388)
 * Hi Pikamander2,
 * Thanks for your message. I hope you had a good weekend.
 * Our development team is working on a fix for this and will soon have a plugin
   update to solve this issue. I will message back here when it is ready.
 * Thanks again for letting us know. In the meantime, if there is anything else,
   don’t hesitate to get back to us.
 * All the best.
 *  Plugin Support [gavinohanlon](https://wordpress.org/support/users/gavinohanlon/)
 * (@gavinohanlon)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14718157)
 * Hi Pikamander2,
 * Thanks for your patience.
 * We have updated Easy Pricing Tables to take care of your previously mentioned
   issue.
 * If you encounter any further problems, don’t hesitate to get to us.
 * All the best and have a good weekend.
 *  Plugin Support [gavinohanlon](https://wordpress.org/support/users/gavinohanlon/)
 * (@gavinohanlon)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14740949)
 * Hey Pikamander2,
 * I hope all is well.
 * I am going to mark this as “resolved” but if you have any more issues, feel free
   to reach out to us again.
 * All the best.
 *  Thread Starter [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14783101)
 * Hi [@gavinohanlon](https://wordpress.org/support/users/gavinohanlon/) – It looks
   like this warning is occasionally appearing in the error log now:
 * PHP Warning: count(): Parameter must be an array or an object that implements
   Countable in /home/public_html/wp-content/plugins/easy-pricing-tables/includes/
   settings.php on line 9
 * Here’s the relevant line, which is part of the dh_ptp_settings_menu function:
 * `$position = count( $submenu_list ) -1;`
 *  Thread Starter [pikamander2](https://wordpress.org/support/users/pikamander2/)
 * (@pikamander2)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14783178)
 * It looks like we’re using a “legacy pricing table”, so I’m not sure if that’s
   related to the PHP warning at all.
 *  Plugin Support [gavinohanlon](https://wordpress.org/support/users/gavinohanlon/)
 * (@gavinohanlon)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-warning-301/#post-14796028)
 * Hey Pikamander2,
 * Thanks for your message and bringing this up.
 * To help us trouble shoot this better, could you let us know where you are seeing
   the issue or what you are doing when the error shows up. When I take a quick 
   look through when I am using the plugin, I don’t see this error.
 * Looking forward to hearing back from you.
 * All the best.
 *  [mojamba](https://wordpress.org/support/users/mojamba/)
 * (@mojamba)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-301/#post-15308876)
 * I just received a similar warning from the WordPress built-in feature that detects
   when a plugin or theme causes a fatal error on your site:
 * An error of type E_ERROR was caused in line 9 of the file /[…]/wp-content/plugins/
   easy-pricing-tables/includes/settings.php. Error message: Uncaught TypeError:
   count(): Argument #1 ($value) must be of type Countable|array, null given in /[…]/
   wp-content/plugins/easy-pricing-tables/includes/settings.php:9
 *  Plugin Support [gavinohanlon](https://wordpress.org/support/users/gavinohanlon/)
 * (@gavinohanlon)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-301/#post-15310843)
 * Hi Mojamba,
 * Thanks for your message.
 * It might be better to start your own thread for this one as per the forum rules–
   [https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too](https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too)
 * To help us trouble shoot this better, could you give us more details about the
   issue or what you are doing when the error shows up. Is that the exact message
   you get ? Or are there some details missing from your error message, e.g. on 
   the /[…]/ part ?
 * Looking forward to hearing back from you.
 * All the best.
 *  [mojamba](https://wordpress.org/support/users/mojamba/)
 * (@mojamba)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-301/#post-15311196)
 * Thanks. I did as you suggested and created a new topic.

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

The topic ‘PHP warning’ is closed to new replies.

 * ![](https://ps.w.org/easy-pricing-tables/assets/icon-256x256.gif?rev=2922075)
 * [Pricing Table WordPress Plugin - Easy Pricing Tables](https://wordpress.org/plugins/easy-pricing-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-pricing-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-pricing-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-pricing-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-pricing-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-pricing-tables/reviews/)

 * 12 replies
 * 3 participants
 * Last reply from: [mojamba](https://wordpress.org/support/users/mojamba/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/php-warning-301/#post-15311196)
 * Status: resolved