bug fix for role related code.
-
Hello.
I’ve met an issue that throws php error. Maybe this is an edge case.Here is the file location.
plugins/yet-another-related-posts-plugin/lib/plugin-deactivation-survey/deactivate-feedback-form.phpline # 63
if ( $current_user->roles[0] ) { $role = $current_user->roles[0]; }
The first item of roles doesn’t use index 0 in some cases. In my case, it is 12. So it should use the first element, not using index 0.
if ( ! empty( $current_user->roles ) ) { $role = reset( $current_user->roles ); }
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘bug fix for role related code.’ is closed to new replies.