Title: Warning: array_push()
Last modified: January 28, 2019

---

# Warning: array_push()

 *  Resolved [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/)
 * (@glenmereschool)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/)
 * Hi,
 * I’m using your plugin for a school blog.
    It works great, but on some of the 
   quizzes, a warning is appearing…but as far as I can tell, the quiz works ok. 
   The warning is:
 * Warning: array_push() [function.array-push]: First argument should be an array
   in /var/sites/s/removed.co.uk/public_html/blogs/wp-content/plugins/hd-quiz/includes/
   functions.php on line 160
 * Here is code from line 160, 161 and 162:
 *     ```
       array_push($hdq_answers[$hdq_selected - 1], "checked");
           if ($hdq_random_answer_order === "yes") {
               shuffle($hdq_answers);
       ```
   
 * Thank you for any help.
    -  This topic was modified 7 years, 2 months ago by [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/).

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

 *  Thread Starter [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/)
 * (@glenmereschool)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11138856)
 * This was the first thread I submitted.
    It said it was being moderated but as
   it wasn’t showing on my profile, I thought it had messed up and been deleted.
   Sorry for duplicate thread I then posted, which I’ve since marked ‘Resolved’,
   but the issue obviously hasn’t been resolved yet!
 *  Plugin Author [Harmonic Design](https://wordpress.org/support/users/harmonic_design/)
 * (@harmonic_design)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11140632)
 * Hello GlenmereSchool,
    Thank you for bringing this to my attention.
 * Please note that this is just a “warning” not an “error” and is generated by 
   PHP itself. Having PHP warnings/errors enabled on a live production site is not
   a good idea because it would allow a hacker to gain information on the server,
   site, structure etc. Because of this, I would strongly recommend turning off 
   PHP messages.
 * Please edit `wp-config.php` (located in your root web folder – the place that
   you installed WordPress to) and make sure that WP_DEBUG is set to false.
 * Should look like this: `define('WP_DEBUG', false);`
 * However, with that said, I will push out a minor update soon that should hopefully
   remove the warning message even for those who are running in debug mode and have
   php messages enabled.
 * It could also be useful to see a quiz with the warning message, so please provide
   a link if you can.
 *  Thread Starter [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/)
 * (@glenmereschool)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11143048)
 * Thank you for the reply.
 * I checked my WP_DEBUG and it was already set to false.
 * Since the update, my first warning message has gone, but there’s now a warning
   message for the same thing but on line 256.
 * `Warning: array_push() [function.array-push]: First argument should be an array
   in /var/sites/s/removed.co.uk/public_html/blogs/wp-content/plugins/hd-quiz/includes/
   functions.php on line 256`
 * I can’t seem to private message you a link to a quiz with the warning…and I don’t
   really want to put the URL here…can you suggest something?
 * Thank you.
 *  Plugin Author [Harmonic Design](https://wordpress.org/support/users/harmonic_design/)
 * (@harmonic_design)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11146759)
 * Hi GlenmereSchool,
    You can send me an email from my website [https://harmonicdesign.ca](https://harmonicdesign.ca)
   and use the contact page.
 * Even though this issue will be fixed for you any day, I think it’s best we get
   in contact via email so I can fix this for you asap 🙂
 *  Thread Starter [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/)
 * (@glenmereschool)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11153184)
 * I have contacted you through your website. Thanks.

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

The topic ‘Warning: array_push()’ is closed to new replies.

 * ![](https://ps.w.org/hd-quiz/assets/icon-256X256.gif?rev=2936040)
 * [HD Quiz](https://wordpress.org/plugins/hd-quiz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hd-quiz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hd-quiz/)
 * [Active Topics](https://wordpress.org/support/plugin/hd-quiz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hd-quiz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hd-quiz/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [GlenmereSchool](https://wordpress.org/support/users/glenmereschool/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/warning-array_push/#post-11153184)
 * Status: resolved