[wp-trac] [WordPress Trac] #46050: blocks.php - Invalid argument supplied for foreach()
WordPress Trac
noreply at wordpress.org
Mon Jan 21 17:45:36 UTC 2019
#46050: blocks.php - Invalid argument supplied for foreach()
--------------------------+-----------------------------
Reporter: filosofem | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.0.3
Severity: critical | Keywords:
Focuses: |
--------------------------+-----------------------------
I'm getting following error after upgrading to WP 5.0.3:
Invalid argument supplied for foreach() in /wp-includes/blocks.php on line
183\n
As a result - output HTML is corrupted, some letters and words disappear
in HTML resulting output.
Code statement which generating error:
{{{#!php
<?php
foreach ( $block['innerContent'] as $chunk ) { $block_content .=
is_string( $chunk ) ? $chunk : render_block( $block['innerBlocks'][
$index++ ] ); }
}}}
I'm using PHP 7.2.13 and MariaDB 10.3.8. Disabling all plugins and using
default WP 5.0 theme - not helped at all.
I tested it on PHP 5.6.39 and PHP 7.1.25 - all works fine. Bug appears on
PHP 7.2.13 only.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46050>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list