Title: Undefined variable functions.php
Last modified: September 1, 2016

---

# Undefined variable functions.php

 *  [simon2902](https://wordpress.org/support/users/simon2902/)
 * (@simon2902)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-functionsphp-1/)
 * Hi
 * I get the following message on my site: Notice: Undefined variable: zerif_lite_sidebars
   in /home3/thougjk5/public_html/wp-content/themes/zeriflite_child/functions.php
   on line 17
 * code:
 *     ```
       if ( empty ( $active_widgets[ $zerif_lite_sidebars['sidebar-ourfocus'] ] ) ):
   
       		$zerif_lite_counter = 1;
       ```
   
 * The message appeared after I changed WP DEBUG to true in wp-config.php.
 * Any help would be be appreciated.
 * Thanks
    Simon

Viewing 1 replies (of 1 total)

 *  [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * (@electricfeet)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-functionsphp-1/#post-7537689)
 * That’s something in your child theme (which is called “zeriflite_child”, as shown
   in the error above). The lines themselves are valid—they’re also used in the 
   main theme—but the main theme defines the variable `$zerif_lite_sidebars` properly
   before trying to use it.
 * You’d get the same error if you wrote:
 *     ```
       if ( empty ( $ppp[ $qqq ] ) ) {
       }
       ```
   
 * in your child theme’s functions.php. PHP doesn’t allow this.
 * So the answer is to fix your child theme so that the variable is properly defined.

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable functions.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/zerif-lite/1.8.5.49/screenshot.
   png)
 * Zerif Lite
 * [Support Threads](https://wordpress.org/support/theme/zerif-lite/)
 * [Active Topics](https://wordpress.org/support/theme/zerif-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/zerif-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/zerif-lite/reviews/)

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * 1 reply
 * 2 participants
 * Last reply from: [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-functionsphp-1/#post-7537689)
 * Status: not resolved