Title: Undefined Variable
Last modified: August 22, 2016

---

# Undefined Variable

 *  Resolved [Austin Adamson](https://wordpress.org/support/users/austin-adamson/)
 * (@austin-adamson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-12/)
 * Hey Smashballoon,
 * I am using version 2.0.1 of Custom Facebook Feed and I received this error:
 * Notice: Undefined variable: cff_item_styles in **CLIENT-SITE**/wp-content/plugins/
   custom-facebook-feed/custom-facebook-feed.php on line 1142
 * I believe that this is because the variable is declared within the if statement
   on line 469 of custom-facebook-feed.php. Since we are not using the style options
   in the admin pages, I am guessing that the if statement is false, the variable
   is never declared, and is then undefined when line 1142 is executed.
 * The solution that I am currently using is declaring the variable prior to the
   if statement as follows:
 *     ```
       $cff_item_styles = '';
       if( $cff_sep_color_check || $cff_post_bg_color_check ){
               $cff_item_styles .= 'style="';
               if($cff_sep_color_check && !$cff_post_bg_color_check) $cff_item_styles .= 'border-bottom: ' . $cff_sep_size . 'px solid #' . str_replace('#', '', $cff_sep_color) . '; ';
               if($cff_post_bg_color_check) $cff_item_styles .= 'background-color: ' . $cff_post_bg_color . '; ';
               if(isset($cff_post_rounded)) $cff_item_styles .= '-webkit-border-radius: ' . $cff_post_rounded . 'px; -moz-border-radius: ' . $cff_post_rounded . 'px; border-radius: ' . $cff_post_rounded . 'px; ';
               $cff_item_styles .= '"';
       }
       ```
   
 * Outside of this issue, the plugin’s functionality is fantastic. Well done.
 * [https://wordpress.org/plugins/custom-facebook-feed/](https://wordpress.org/plugins/custom-facebook-feed/)

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

 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-12/#post-5202945)
 * Hey Austin,
 * Thanks for letting me know about the issue. I’ll get this cleaned up in the next
   update.
 * Apologies for the inconvenience,
 * John
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-12/#post-5203160)
 * Hey Austin,
 * I just released version 2.1 which contains this fix. Thanks again for letting
   me know about it.
 * John

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

The topic ‘Undefined Variable’ is closed to new replies.

 * ![](https://ps.w.org/custom-facebook-feed/assets/icon-256x256.png?rev=2700775)
 * [Smash Balloon Social Post Feed - Simple Social Feeds for WordPress](https://wordpress.org/plugins/custom-facebook-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-facebook-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-facebook-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-facebook-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-facebook-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-facebook-feed/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-12/#post-5203160)
 * Status: resolved