Few warnings to fix
-
Hello,
lately we install Lite version of your plugin and we meet with few warnings on the front-page.
Please in next release update few lines of code:
Lines 90-91 from:
$current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0];
to
if(is_array($current_user->$gm_role)) { $current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0]; }
Lines 312-313 from:
$current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0];
to
if(is_array($current_user->$gm_role)) { $current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0]; }
Lines 355-356 from:
$current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0];
to
if(is_array($current_user->$gm_role)) { $current_user->role = array_keys($current_user->$gm_role); $gm_role = $current_user->role[0]; }
Thanks.
PS1. Variable $gm_role isn’t use in the code latter so it’s useless anyway.
PS2. If you don’t prefer OOP, please use just the rule to not repeat yourself and put that bit of code in one function to avoid hundreds error from same reason in hundreds places.Best regards,
Tomasz
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Few warnings to fix’ is closed to new replies.