INN / developer-driven-custom-post-classes

WordPress plugin simplifying process of creating a metabox for applying custom classes to post_class()
GNU General Public License v2.0
0 stars 0 forks source link

Improve type checking in editor metabox class #2

Open benlk opened 4 years ago

benlk commented 4 years ago

https://github.com/INN/developer-driven-custom-post-classes/blob/cde8313d15929bb8610c6f46fa2b85f374a5283b/includes/class-editor-metabox.php#L146

With WP_DEBUG, this causes output like:

Notice: Uninitialized string offset: 0 in /mstoday/wp-content/plugins/developer-driven-custom-post-classes/includes/class-editor-metabox.php on line 146 class="clearfix post-697619 post type-post status-publish format-standard has-post-thumbnail hentry category-coronavirus-in-mississippi prominence-homepage-featured prominence-top-story featured-media featured-media-image">