Title: Undefined variable missing argument
Last modified: August 21, 2016

---

# Undefined variable missing argument

 *  [gallantfish](https://wordpress.org/support/users/gallantfish/)
 * (@gallantfish)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-missing-argument/)
 * I don’t remember the error, whether it was undefined variable or missing argument,
   or undefined value in object… but In my case, version 2.6, I found out the problem
   is a typo on the conditionals.
 * The **use_forpost** and **use_forpage** values are checked for existence EVEN
   if their parent **use_perpage** parent option is not selected, trowing an error.
   It seems like the author recycled the use_forpage piece of code to make the use_perpage
   piece of code, or confused the variable names, or I’m just breaking it for when
   I eventually need them selected, but it works for me now.
 * In line 182, Instead of
 *     ```
       if ((isset($lightboxPlusOptions['use_forpage']) && $lightboxPlusOptions['use_forpage'] == '1') || (isset($lightboxPlusOptions['use_forpost']) && $lightboxPlusOptions['use_forpost'] == '1')) {
       ```
   
 * change it to
 *     ```
       if ((isset($lightboxPlusOptions['use_perpage']) && $lightboxPlusOptions['use_forpage'] == '1') || (isset($lightboxPlusOptions['use_perpage']) && $lightboxPlusOptions['use_forpost'] == '1')) {
       ```
   
 * Or just CHECK the parent post/page option so the children options show, UN-CHECK
   the child page and post options and then un-check the parent again, and save.
 * [http://wordpress.org/plugins/lightbox-plus/](http://wordpress.org/plugins/lightbox-plus/)

The topic ‘Undefined variable missing argument’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lightbox-plus_fafafa.svg)
 * [Lightbox Plus Colorbox](https://wordpress.org/plugins/lightbox-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-plus/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [object](https://wordpress.org/support/topic-tag/object/)
 * [sent](https://wordpress.org/support/topic-tag/sent/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * 0 replies
 * 1 participant
 * Last reply from: [gallantfish](https://wordpress.org/support/users/gallantfish/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-missing-argument/)
 * Status: not resolved