Title: Error With WP Debug Enabled (fix provided)
Last modified: August 8, 2025

---

# Error With WP Debug Enabled (fix provided)

 *  [bzle](https://wordpress.org/support/users/bzle/)
 * (@bzle)
 * [8 months ago](https://wordpress.org/support/topic/error-with-wp-debug-enabled-fix-provided/)
 * The plugin Seriously Simple Podcasting creates a custom post type Episodes. When
   WP Debug is enabled, the episodes show as 404 pages instead of displaying.
 * Turns out this is related to line 373 of class-custom_body_class.php:
   $values
   = explode( ‘ ‘, $val );
 * Here’s the code that resolved this issue for me (replacing lines 371-383):
 *     ```wp-block-code
       if ( ! empty( $res ) ) {foreach ( $res as $k => $val ) {// Only accept strings; ignore null/arrays/etc.if ( ! is_string( $val ) ) {continue;}$val = trim( $val );if ( $val === '' ) {continue;}// Split on any whitespace, skip empties.$values = preg_split( '/\s+/', $val, -1, PREG_SPLIT_NO_EMPTY );foreach ( $values as $value ) {if ( ! in_array( $value, $rezult, true ) ) {$rezult[] = $value;}}}}
       ```
   

The topic ‘Error With WP Debug Enabled (fix provided)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-custom-body-class.svg)
 * [Custom Body Class](https://wordpress.org/plugins/wp-custom-body-class/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-custom-body-class/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-custom-body-class/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-custom-body-class/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-custom-body-class/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [bzle](https://wordpress.org/support/users/bzle/)
 * Last activity: [8 months ago](https://wordpress.org/support/topic/error-with-wp-debug-enabled-fix-provided/)
 * Status: not resolved