Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-4695

Exception: Cannot use object of type WP_Error as array

    XporterXMLWordPrintable

    Details

    • Story Points:
      2
    • Sprint:
      Sprint #133
    • Section:
      Block: Counter
    • Track:
      Development
    • Repositories:
      planet4-plugin-gutenberg-blocks

      Description

      Sentry Issue: PLANET4-6D

      Sentry\Exception\FatalErrorException: Error: Uncaught Error: Cannot use object of type WP_Error as array in /app/source/public/wp-content/plugins/planet4-plugin-gutenberg-blocks/classes/blocks/class-counter.php:110
      Stack trace:
      #0 /app/source/public/wp-content/plugins/planet4-plugin-gutenberg-blocks/classes/blocks/class-base-block.php(33): P4GBKS\Blocks\Counter->prepare_data(Array)
      #1 /app/source/public/wp-includes/class-wp-block-type.php(109): P4GBKS\Blocks\Base_Block->render(Array, '')
      #2 /app/source/public/wp-includes/blocks.php(487): WP_Block_Type->render(Array, '')
      #3 /app/source/public/wp-includes/blocks.php(537): render_block(Array)
      #4 /app/source/public/wp-includes/class-wp-hook.php(288): do_blocks('<!-- wp:html --...')
      #5 /app/source/public/wp-includes/plugin.php(206): WP_Hook->apply_filters('<!-- wp:html --...', Array)
      #6 /app/source/public/wp-content/plugins/timber-library/lib/Post.php(1159): apply_filters('the_content', '<!-- wp:html --...')
      #7 /app/source/public/wp-content/plugins/timber-library/vendor/twig/twig/lib/Twig/Template.php(675): 
        File "/wp-content/plugins/planet4-plugin-gutenberg-blocks/classes/blocks/class-counter.php", line 110
          $response_body = json_decode( $response_api['body'], true );
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              sdeshmuk Sagar Deshmukh
              Reporter:
              nroussos Nikos Roussos
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: