[wp-trac] [WordPress Trac] #62600: fatal error on capabilities.

WordPress Trac noreply at wordpress.org
Tue Apr 29 14:50:47 UTC 2025


#62600: fatal error on capabilities.
----------------------------------------+-----------------------------
 Reporter:  neo2k23                     |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Role/Capability             |     Version:  6.8
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------
Changes (by mdibrahimk48):

 * version:   => 6.8


Comment:

 $role_caps = (isset($role_data['capabilities'])) ? array_keys(
 array_filter( $role_data['capabilities'] ) ) : array();


 Added a condition to avoid fatal errors when expected capabilities are
 missing from the array. ^

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


More information about the wp-trac mailing list