Notice in function: wp_user_avatars_meta_caps at capabilities
-
Hello,
i got this php “error” from your wp_user_avatars-plugin: Notice: Undefined offset: 0 in ../plugins/wp-user-avatars/wp-user-avatars/includes/capabilities.php on line 39
I found the reason at the user_can function, because the function not handles arguments:
if ( user_can( $user_id, 'edit_user', $args[0]) ) { $caps = array(); }
I think this will be fix the notice, because arguments not supported in the wordpress user_can function.
if ( user_can( $user_id, 'edit_user') ) { $caps = array(); }
This is the user_can function from wordpress:
/** * Whether a particular user has a specific capability. * * @since 3.1.0 * * @param int|WP_User $user User ID or object. * @param string $capability Capability name. * @return bool Whether the user has the given capability. */ function user_can( $user, $capability ) { ... }
Would be nice, if you can fix this.
Regards, Brian
- The topic ‘Notice in function: wp_user_avatars_meta_caps at capabilities’ is closed to new replies.