Title: Junk code in wp-includes/functions.php
Last modified: August 19, 2016

---

# Junk code in wp-includes/functions.php

 *  [frankindelicato](https://wordpress.org/support/users/frankindelicato/)
 * (@frankindelicato)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/junk-code-in-wp-includesfunctionsphp/)
 * I loaded the WordPress code into the Eclipse PHP IDE and it immediately detected
   two blocks of HTML that are embedded into the source and caused errors. I checked
   an untouched svn version of the source code and it is the same. The problem is
   also in Wp-mu. You can search for Doctype in functions.php to find the problem.
   Removing the code also causes a PHP parser problem with an unbalanced function
   closing tag in function `function wp_die` the fix for that issue is:
 *     ```
       Old code in wp_die:
   
       if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) :
       	if( !headers_sent() ){
       		status_header( $r['response'] );
       		nocache_headers();
       		header( 'Content-Type: text/html; charset=utf-8' );
       	}
   
       New code in wp_die (replace the ":" with "{} open/closing" :
       	if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) )
               {
       	  if( !headers_sent() )
                 {
       		status_header( $r['response'] );
       		nocache_headers();
       		header( 'Content-Type: text/html; charset=utf-8' );
       	  }
              }
       ```
   

The topic ‘Junk code in wp-includes/functions.php’ is closed to new replies.

## Tags

 * [bad html](https://wordpress.org/support/topic-tag/bad-html/)
 * [wp_die](https://wordpress.org/support/topic-tag/wp_die/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [frankindelicato](https://wordpress.org/support/users/frankindelicato/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/junk-code-in-wp-includesfunctionsphp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
