[buddypress-trac] [BuddyPress Trac] #8503: PHP8 multi-byte safety warning

buddypress-trac noreply at wordpress.org
Thu Jul 15 09:58:48 UTC 2021


#8503: PHP8 multi-byte safety warning
------------------------------+---------------------
 Reporter:  ionvv             |       Owner:  imath
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  8.1.0
Component:  Extended Profile  |     Version:  8.0.0
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch         |
------------------------------+---------------------
Changes (by imath):

 * owner:  (none) => imath
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13012" 13012]:
 {{{
 #!CommitTicketReference repository="" revision="13012"
 Avoid a PHP8 warning when xProfile user visibility levels are empty

 When the record does not exist yet into the usermeta table, getting the
 `'bp_xprofile_visibility_levels'` usermeta returns an empty string while
 we're expecting an array. As we use the expected array to reset the
 visibility level if the administrator enforced a specific visibility to
 the field, it's causing the PHP8 warning. To fix it, we are now casting
 the `'bp_xprofile_visibility_levels'` usermeta as soon as we get it.

 Props johnjamesjacoby

 Fixes #8503 (trunk)
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8503#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list