WordPress.org

Ready to get started?Download WordPress

Forums

Custom Contact Forms
[resolved] PHP Warning and instable admin (11 posts)

  1. taropaa
    Member
    Posted 2 years ago #

    This update destabilizes the admin interface and throws warnings. had to downgrade.

  2. rletc
    Member
    Posted 2 years ago #

    Warning: array_shift() [function.array-shift]: The argument should be an array in /home/zzz/public_html/wp-content/plugins/custom-contact-forms/modules/widget/custom-contact-forms-dashboard.php on  line 22
  3. the-dome
    Member
    Posted 2 years ago #

    Yes got that same error too.

    Warning: array_shift() [function.array-shift]: The argument should be an array in /home/user/public_html/wp-content/plugins/custom-contact-forms/modules/widget/custom-contact-forms-dashboard.php on line 22

  4. rletc
    Member
    Posted 2 years ago #

    in custom-contact-forms-dashboard.php I changed line 21 $user_roles = $current_user->roles;
    to
    $user_roles = array($current_user->roles);

    all seems ok now

  5. the-dome
    Member
    Posted 2 years ago #

    Fantastic! Works a treat. Thanks rletc.

  6. geggiot
    Member
    Posted 2 years ago #

    sorry, solved with rlect fixing code

  7. bluekaren
    Member
    Posted 2 years ago #

    I can't find where to fix this....where is line 21, how do I get to it?

  8. Open the file wp-content/plugins/custom-contact-forms/modules/widget/custom-contact-forms-dashboard.php

    Find line 21 (it's the 21st line in the document, you can count it out if you need to).

    Change
    $user_roles = $current_user->roles;

    to
    $user_roles = array($current_user->roles);

  9. bluekaren
    Member
    Posted 2 years ago #

    Okay, but where? Is it in wordpress under edit plugins? I am having such a hard time with this

  10. bluekaren
    Member
    Posted 2 years ago #

    I think I just figured it out...

  11. bluekaren
    Member
    Posted 2 years ago #

    I found it! Thank you!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic