WordPress.org

Make WordPress Core

Ticket #11327: null-in-widget-classname.patch

File null-in-widget-classname.patch, 478 bytes (added by qualipsoft, 8 years ago)
  • wp-includes/widgets.php

     
    868868                $classname_ = '';
    869869                foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) {
    870870                        if ( is_string($cn) )
    871                                 $classname_ .= '_' . $cn;
     871                                $classname_ .= '_' . ltrim($cn,"\0");
    872872                        elseif ( is_object($cn) )
    873873                                $classname_ .= '_' . get_class($cn);
    874874                }