• Resolved tkuhnvt

    (@tkuhnvt)


    Recently, we noticed that this error is showing on multiple instances of the quiz across different sites, but not on all.

    Is this due to a recent update? Our development team cannot find the way to fix this error. Anyone else have this issue?

    Warning: Invalid argument supplied for foreach() in /chroot/home/ae112998/3c8b3ff43d.nxcli.net/html/wp-content/plugins/quiz-master-next/php/classes/class-qsm-contact-manager.php on line 277

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @tkuhnvt

    Sorry for any inconvenience you had. I will definitely help you to find a solution to the issue you are having. Please send us the below-given details so we will check for this issue.

    1. WP version
    2. PHP version
    3. Database version
    4. QSM version.
    5. Error log if available

    Regards,
    Sumit

    Thread Starter tkuhnvt

    (@tkuhnvt)

    Thanks Sumit. Here’s some more detail…

    1. WP version – 6.0.2

    2. PHP version – 8.0.21

    3. Database version –
    Extension mysqli
    Server version 10.5.16-MariaDB
    Client version mysqlnd 8.0.21

    4. QSM version – 8.0.3

    5. Error log if available

    On the Contact Tab of one of my QSM quizzes there is an error message:
    Warning: foreach() argument must be of type array|object, string given in /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-content/plugins/quiz-master-next/php/classes/class-qsm-contact-manager.php on line 277 Fatal error: Uncaught Error: [] operator not supported for strings in /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-content/plugins/quiz-master-next/php/classes/class-qsm-contact-manager.php:300 Stack trace: #0 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-content/plugins/quiz-master-next/php/admin/options-page-contact-tab.php(32): QSM_Contact_Manager::load_fields('edit') #1 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-content/plugins/quiz-master-next/php/admin/quiz-options-page.php(203): qsm_options_contact_tab_content() #2 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-includes/class-wp-hook.php(307): qsm_generate_quiz_options('') #3 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #4 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #5 /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-admin/admin.php(259): do_action('admin_page_mlw_...') #6 {main} thrown in /chroot/home/a38e0be8/4b7fa38a7f.nxcli.net/html/wp-content/plugins/quiz-master-next/php/classes/class-qsm-contact-manager.php on line 300

    Hi @tkuhnvt

    I need to discuss this with my development team. Hopefully, I will get back to you with the solution.

    Regards,
    Sumit

    Hi @tkuhnvt

    I have turned on WP_DEBUG and WP_DEBUG_LOG on my staging website. I do not see any warning on my contact tab in a quiz.

    Please check the below-given screenshot link for your reference.

    https://ibb.co/Jzy8Xr7

    I do not have any error log in the wp-content folder.

    https://app.usebubbles.com/dPNMqLsmVq4Q8TPVx4EoY1/untitled-bubble

    I request you to please share the below-given information so we can troubleshoot the issue.

    1. A screenshot of your contact setup in the quiz.
    2. Any field that is set as required?
    3. Any field that has a set with Min and Max length?
    4. Please share a screencast of the quiz settings.

    We need to replicate all the contact form fields and try to trigger the PHP warning.

    Expecting your kind cooperation in this case and we are always here to assist you.

    Kind regards,
    Sumit

    Hi @tkuhnvt ,

    Can you please provide the above-mentioned details?

    Regards,
    Sumit

    Hi @tkuhnvt

    We haven’t heard back from you in a while, is your issue resolved, or still facing the same issue please confirm.

    If you still face the same issue then please provide the above-mentioned details.

    Regards,
    Sumit

    Thread Starter tkuhnvt

    (@tkuhnvt)

    Hi Sumit,
    I am not comfortable sharing all the details on this forum.

    However, I tried a different approach… we re-created the same quiz in the same instance and it works. I am unsure why the old content or configuration may have broken what was already in place, but it did. We will move forward with re-creating the quizzes and adding a contact form.

    Thanks for your help.

    Hi @tkuhnvt

    Please let us know if you need more help in the future.

    Regards,
    Sumit

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error – Invalid argument supplied for foreach()’ is closed to new replies.