[wp-trac] [WordPress Trac] #51084: „Trying to access array offset on value of type bool“ in "/wp-admin/includes/class-wp-privacy-policy-content.php on line 96 & 97“

WordPress Trac noreply at wordpress.org
Fri Aug 21 19:34:40 UTC 2020


#51084: „Trying to access array offset on value of type bool“ in "/wp-
admin/includes/class-wp-privacy-policy-content.php on line 96 & 97“
----------------------------------+--------------------------------------
 Reporter:  treibstoff            |       Owner:  SergeyBiryukov
     Type:  defect (bug)          |      Status:  closed
 Priority:  normal                |   Milestone:  5.6
Component:  Privacy               |     Version:  5.5
 Severity:  normal                |  Resolution:  fixed
 Keywords:  needs-privacy-review  |     Focuses:  administration, privacy
----------------------------------+--------------------------------------

Comment (by treibstoff):

 Replying to [comment:5 SergeyBiryukov]:
 > Hi there, welcome back to WordPress Trac! Thanks for the report.
 >
 > Just noting that I could not reproduce the issue on a clean install, but
 it looks like this can happen when the
 `_wp_suggested_privacy_policy_content` meta value for the Privacy Policy
 page is somehow corrupted.
 >
 > I think adding an `is_array()` check before accessing the
 `$data['plugin_name']` and `$data['policy_text']` values would make sense.

 thanx @SergeyBiryukov, this solution works.
 hope it will stay with the next update of class-wp-privacy-policy-
 content.php

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


More information about the wp-trac mailing list