Support » Plugin: Easy Invitation Codes » A Warning is show

  • 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.


Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.


    Plugin Author Julio Potier


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

    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.


    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.


    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() []: 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.

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

    Plugin Author Julio Potier


    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘A Warning is show’ is closed to new replies.