Opened 7 weeks ago
Closed 6 weeks ago
#9333 closed defect (bug) (invalid)
Found an issue at buddypress/bp-members/classes/class-bp-members-admin.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | |
| Cc: |
Description
after i installed the buddypress plugin in my local server, i get an error message at the user page. although currently i have solved it, but it needed to be fixed in the original code.
here is the error-
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-list-table.php:661 Stack trace: #0 C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-users-list-table.php(629): WP_List_Table->row_actions(NULL) #1 C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-users-list-table.php(415): WP_Users_List_Table->single_row(Object(WP_User), ”, ”, NULL) #2 C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-list-table.php(1711): WP_Users_List_Table->display_rows() #3 C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-list-table.php(1635): WP_List_Table->display_rows_or_placeholder() #4 C:\xampp\htdocs\civilnotes\wp-admin\users.php(816): WP_List_Table->display() #5 {main} thrown in C:\xampp\htdocs\civilnotes\wp-admin\includes\class-wp-list-table.php on line 661
and here is my current solution-
public function row_actions( $actions = array(), $user = null ) {
// Bail if no user ID.
if ( ! is_array( $actions ) ) {
$actions = array();
}
if ( empty( $user->ID ) ) {
return $actions;
}
please solve the issue, and let me know about the update.
thank you..