WordPress.org

Ready to get started?Download WordPress

Forums

Easy Invitation Codes
A Warning is show (8 posts)

  1. orboan
    Member
    Posted 1 year ago #

    Hello,
    I installed this plugin in the 3.4.2 version and Multisites Network, and once activated a warning is shown (below the admin bar):

    Warning: Invalid argument supplied for foreach() in /home/orboanx/public_html/wp-content/plugins/baw-invitation-codes/inc/back-end.php on line 347

    I know I can run the plugin because it's a warning, not an error, but I's like to remove this warning message, it's unacceptable to show it to my customers or registered users.

    I can handle editing php files if needed, just tell me how to solve this invalid argument warning, if there's to do any change to a php function in that file at line 347.

    Thanks.

    http://wordpress.org/extend/plugins/baw-invitation-codes/

  2. orboan
    Member
    Posted 1 year ago #

    Well, once at least 1 code is created that warning dissapears. Therefore it can be solve with just a conditional checking if at least 1 code is created.

    If you know what is the boolean to check in this conditional (how to check the existence of at least 1 code) please tell me.

    thx.

  3. Julio Potier
    Member
    Plugin Author

    Posted 1 year ago #

    Hello, i'll check this asap, thank you !
    ps : so you activated the plugin and delete the demo code ?

  4. orboan
    Member
    Posted 1 year ago #

    Hello Julio,
    I activated the plugin and I didn't notice any demo code.
    When I first saw the warning was when I was in the main dashboard section (just after activating the plugin from the Multisites network dashborad -it was network activated- and next navigating to the dashboard of a child site), and from there I directly went to Add new code, added a new code and voilĂ  the warning dissapear. Cheking the list of codes, then, I only see the code I created.

  5. orboan
    Member
    Posted 1 year ago #

    Update:

    I've navigated now to the dashboard of another child site and the warning is shown. I navigated to the Invitation Code section and there is none, and a message which says "No codes yet, add one!". If there should be a demo code, it seems that the Multisites Network activation of the plugin somehow unable the creation of that demo code and thus triggers that warning.

  6. orboan
    Member
    Posted 1 year ago #

    Update+:

    In the first time I created a code manually without problem and the warning dissapeared. In this second time (in the second child site) I've tried to create codes automatically (Generate Codes section) and the result are 2 more warnings:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/orboanx/public_html/wp-content/plugins/baw-invitation-codes/inc/back-end.php on line 152

    Warning: Cannot modify header information - headers already sent by (output started at /home/orboanx/public_html/wp-content/plugins/baw-invitation-codes/inc/back-end.php:152) in /home/orboanx/public_html/wp-includes/pluggable.php on line 881

    Hope this info helps you.

  7. orboan
    Member
    Posted 1 year ago #

    more on that last info: after the 2 mentioned warnings, the codes are generated and the initial warning dissapears.

  8. Julio Potier
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, i did not test my plugin on MS install, this is not design for this at first glance.
    Thanks for all this informations!
    See you soon

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.