Changes between Initial Version and Version 3 of Ticket #62600
- Timestamp:
- 03/05/2025 04:42:49 PM (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #62600
- Property Keywords has-patch needs-unit-tests added
- Property Component General → Role/Capability
- Property Milestone Awaiting Review → Future Release
- Property Version 6.7.1
-
Ticket #62600 – Description
initial v3 1 1 I ran in to a weird issue in a client website claiming it was the theme causing it. I got a fatal error in every page on the author meta box when using the classic editor layout. 2 2 3 {{{ 3 4 Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /home/wp-includes/class-wp-user-query.php:485 Stack trace: 4 5 #0 /home/wp-includes/class-wp-user-query.php(485): array_filter(NULL) … … 11 12 #7 /home/wp-admin/post.php(206): require('/home/...') 12 13 #8 {main} thrown in /home/wp-includes/class-wp-user-query.php on line 485 13 14 }}} 14 15 15 16 It appeared that he some how in the past had a plugin that created user roles with capabilties, but also some without. … … 23 24 {{{#!php 24 25 <?php 25 $role_caps = array_keys( array_filter( $role_data['capabilities'] ) );26 $role_caps = array_keys( array_filter( $role_data['capabilities'] ) ); 26 27 }}} 27 28 … … 31 32 {{{#!php 32 33 <?php 33 $role_caps = array();34 if ( isset( $role_data['capabilities'] ) ) $role_caps = array_keys( array_filter( $role_data['capabilities'] ) );34 $role_caps = array(); 35 if ( isset( $role_data['capabilities'] ) ) $role_caps = array_keys( array_filter( $role_data['capabilities'] ) ); 35 36 }}} 36 37
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)