• Resolved dannyjensen

    (@dannyjensen)


    [14-Mar-2024 16:13:50 UTC] PHP Fatal error:  Uncaught TypeError: addslashes(): Argument #1 ($string) must be of type string, stdClass given in /httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php:140
    Stack trace:
    #0 /httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php(140): addslashes()
    #1 /httpdocs/wp-includes/class-wp-block.php(258): WPGMZA\Integration\Gutenberg->onRender()
    #2 /httpdocs/wp-includes/blocks.php(1484): WP_Block->render()
    #3 /httpdocs/wp-includes/blocks.php(1522): render_block()
    #4 /httpdocs/wp-includes/class-wp-hook.php(324): do_blocks()
    #5 /httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #6 /httpdocs/wp-includes/post-template.php(256): apply_filters()
    #7 /httpdocs/wp-content/themes/pe-eco-energy/tpl/content-page.php(35): the_content()
    #8 /httpdocs/wp-includes/template.php(792): require('...')
    #9 /httpdocs/wp-includes/template.php(725): load_template()
    #10 /httpdocs/wp-includes/general-template.php(206): locate_template()
    #11 /httpdocs/wp-content/themes/pe-eco-energy/page.php(31): get_template_part()
    #12 /httpdocs/wp-includes/template-loader.php(106): include('...')
    #13 /httpdocs/wp-blog-header.php(19): require_once('...')
    #14 /httpdocs/index.php(17): require('...')
    #15 {main}
      thrown in /httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php on line 140

    This error happens because addslashes($v) on line 140 in class.gutenberg.php gets an object and addslashes only takes a string.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author DylanAuty

    (@dylanauty)

    Hi @dannyjensen,

    Thank you for taking the time to report this issue to us, we do appreciate it.

    I’ve had a look at the code which manages this block and we do have various checks in place to appropriately process different data-types, but as you have mentioned, we do not currently account for objects.

    I’ve logged this on our side, and we will tend to this in the next update to the plugin. If you would like a short term solution to the issue, you are welcome to reach out to us on our website and I’d gladly assist you with a few minor code changes in the meantime.

    Another alternative may be to simply make use of the shortcode for the time being.

    I will update this thread once we have resolved this in an official update as well. ??

    Plugin Author DylanAuty

    (@dylanauty)

    Hi there,

    We have released an update (9.0.35) which adds additional checks for object conversion to the Gutenberg modules.

    Thank you again for taking the time to report this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error’ is closed to new replies.