• Resolved pikamander2

    (@pikamander2)


    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter pikamander2

    (@pikamander2)

    Based on this page, maybe it’s supposed to be named ‘styles’ instead?

    Thread Starter pikamander2

    (@pikamander2)

    Based on this page, 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

    (@pikamander2)

    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

    (@gavinohanlon)

    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

    (@gavinohanlon)

    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

    (@gavinohanlon)

    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

    (@pikamander2)

    Hi @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

    (@pikamander2)

    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

    (@gavinohanlon)

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.