Title: Undefined variable $css_class
Last modified: August 30, 2016

---

# Undefined variable $css_class

 *  Resolved [g_ain](https://wordpress.org/support/users/g_ain/)
 * (@g_ain)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/)
 * In master-slider/admin/includes/classes/class-msp-shortcode-factory.php, MSP_Shortcode_Factory::
   get_ms_slide_info_shortcode() method, the $css_class is undefined if slide info
   is anything other than empty string. Please initialize the variable so that it
   doesn’t throw notices:
 *     ```
       if( !$the_content )
           return '';
   
       $css_class = ( " " == $the_content ) ? 'ms-info-empty' : '';
       return sprintf( '[%1$s css_class="%3$s"]%2$s[/%1$s]', 'ms_slide_info', $the_content, $css_class )."\n";
       ```
   
 * [https://wordpress.org/plugins/master-slider/](https://wordpress.org/plugins/master-slider/)

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

 *  Plugin Author [averta](https://wordpress.org/support/users/averta/)
 * (@averta)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599671)
 * Dear friend,
 * Thanks for using Master Slider.
 * As I check the code, the $css_class variable always has a value ( ‘ms-info-empty’
   or empty string ). Could you send me exact notice that you received in your installation?
 * Kind regards
 *  Thread Starter [g_ain](https://wordpress.org/support/users/g_ain/)
 * (@g_ain)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599672)
 * The code I attached is my patched version.
 *  Plugin Author [averta](https://wordpress.org/support/users/averta/)
 * (@averta)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599716)
 * Dear friend,
 * We released new version and already addressed this issue too, please update to
   latest version.
 * BTW, Thanks for reporting and your patience.
 * Regards
 *  Thread Starter [g_ain](https://wordpress.org/support/users/g_ain/)
 * (@g_ain)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599795)
 * Looks like master slider pro 2.20.4 has the same issue.
 *  Plugin Author [averta](https://wordpress.org/support/users/averta/)
 * (@averta)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599796)
 * Hi,
    Thanks for your report.
 * Version 2.22.1 pro released on 4 nov 15.

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

The topic ‘Undefined variable $css_class’ is closed to new replies.

 * ![](https://ps.w.org/master-slider/assets/icon-256x256.png?rev=1638064)
 * [Master Slider - Responsive Touch Slider](https://wordpress.org/plugins/master-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/master-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/master-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/master-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/master-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/master-slider/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [averta](https://wordpress.org/support/users/averta/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-css_class/#post-6599796)
 * Status: resolved