You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 271 ( link ) the variable $user is undefined. I assume it should be $user_or_name->user_login.
From debug.log:
PHP Warning: Undefined variable $user in /includes/plugins/co-authors-plus/class-guest-contributor-role.php on line 271
PHP Warning: Attempt to read property "user_login" on null in /includes/plugins/co-authors-plus/class-guest-contributor-role.php on line 271
I would have done a pull request, but I wasn't sure if wrapping the code in is_object() would make sense and then making the string version the default return value. Or possibly keeping is_string and adding is_object, then returning a random string if neither.
To Reproduce
Steps to reproduce the behavior:
Go to /wp-admin/user-new.php
Choose "Guest Contributor" in the "Role" drop down.
Add user with just a "Display Name", all other fields blank.
View warning in debug.log.
View db wp_users.user_email and see that the email is blank. (I'm not sure if this is OK or not).
Expected behavior
There should be no error in debug.log.
The text was updated successfully, but these errors were encountered:
Describe the bug
On line 271 ( link ) the variable $user is undefined. I assume it should be
$user_or_name->user_login
.From debug.log:
I would have done a pull request, but I wasn't sure if wrapping the code in
is_object()
would make sense and then making the string version the default return value. Or possibly keeping is_string and adding is_object, then returning a random string if neither.To Reproduce
Steps to reproduce the behavior:
/wp-admin/user-new.php
wp_users.user_email
and see that the email is blank. (I'm not sure if this is OK or not).Expected behavior
There should be no error in debug.log.
The text was updated successfully, but these errors were encountered: