[wp-trac] [WordPress Trac] #51390: PHP error: Trying to access array offset on value of type bool in /wp-admin/includes/meta-boxes.php on line 482

WordPress Trac noreply at wordpress.org
Wed Oct 28 21:44:35 UTC 2020


#51390: PHP error: Trying to access array offset on value of type bool in /wp-
admin/includes/meta-boxes.php on line 482
------------------------------------------+-----------------------------
 Reporter:  sproutchris                   |       Owner:  SergeyBiryukov
     Type:  defect (bug)                  |      Status:  reopened
 Priority:  normal                        |   Milestone:  5.6
Component:  Post Formats                  |     Version:  5.5.1
 Severity:  normal                        |  Resolution:
 Keywords:  has-unit-tests needs-testing  |     Focuses:
------------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:18 garrett-eclipse]:
 > After investigation @SergeyBiryukov I found it was the
 `add_theme_support( 'post-formats', array( 'post', 'page' ) );` call in
 the `rest-search-controller.php` `wpSetUpBeforeClass`. Uploaded patch
 [https://core.trac.wordpress.org/attachment/ticket/51390/51390.5.diff
 51390.5.diff] that fixed for my local by introducing post and page as an
 array to the function call.

 Ah, that explains why the notice was only displayed when running the full
 suite and not when running the theme tests individually. Thanks for the
 patch!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51390#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list