foreach() argument must be of type array|object, string given ....

Created on 30 April 2024, 7 months ago
Updated 20 June 2024, 5 months ago

Steps to reproduce

1: After enabling this module when we went to /admin/config/content/layout-builder-browser and clicked the save button, it threw an error,
the error mentioned below.

Warning: foreach() argument must be of type array|object, string given in Drupal\layout_builder_browser\Form\BlockListingForm->submitForm() (line 304 of modules\contrib\layout_builder_browser\src\Form\BlockListingForm.php).

šŸ› Bug report
Status

Postponed: needs info

Version

1.6

Component

Code

Created by

šŸ‡®šŸ‡³India aman_lnwebworks

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aman_lnwebworks
  • Issue was unassigned.
  • Status changed to Needs review 7 months ago
  • šŸ‡®šŸ‡³India aman_lnwebworks

    here is the patch for above issue please review it once

    Thank you

  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @aman_Inwebworks,

    I applied your patch, it was applied smoothly, and fixed the issue mentioned.

    āžœ  layout_builder_browser git:(main) āœ— curl https://www.drupal.org/files/issues/2024-04-30/layout.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   930  100   930    0     0    662      0  0:00:01  0:00:01 --:--:--   663
    patching file src/Form/BlockListingForm.php
    āžœ  layout_builder_browser git:(main) āœ—

    Please see my attachment for reference.

    Thank you.

  • Status changed to RTBC 6 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh
  • Status changed to Postponed: needs info 5 months ago
  • šŸ‡§šŸ‡ŖBelgium StryKaizer Belgium

    I can't reproduce this.
    Please let me know how to reproduce (drupal version, php version, other required contrib?)

    @cleavinjosh: applying a patch is not a reason to mark something RTBC, please actually test if the error occurs and if the patch fixes the issue before marking RTBC

Production build 0.71.5 2024