Title: Fatal error in misc.php
Last modified: August 22, 2016

---

# Fatal error in misc.php

 *  [suckaforlife](https://wordpress.org/support/users/suckaforlife/)
 * (@suckaforlife)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/)
 * When I sign on instead of going to dashboard I get this message:
 * Fatal error: Call to undefined function wp_json_encode() in /home/yaherdme/public_html/
   ya/wp-admin/includes/misc.php on line 668
 * Does anyone know what this means? And what I have to do?

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

 *  Thread Starter [suckaforlife](https://wordpress.org/support/users/suckaforlife/)
 * (@suckaforlife)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601491)
 * This is what that line of code looks like in misc.php, line 668:
 * echo ‘<script type=”text/javascript”>var _wpColorScheme = ‘ . wp_json_encode(
   array( ‘icons’ => $icon_colors ) ) . “;</script>\n”;
 *  [fionaredmond](https://wordpress.org/support/users/fionaredmond/)
 * (@fionaredmond)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601633)
 * I had the same issue.
 * To resolve it – I downloaded the latest version of WordPress from here: [https://wordpress.org/download/](https://wordpress.org/download/).
 * I unzipped the downloaded folder and copied the functions.php file from wp-includes.
   Using FTP I pasted the new functions.php into the wp-includes directory onto 
   my web hosting, when asked if I wanted to overwrite existing file I said yes.
 * I now have access to the Dashboard and my blog.
 *  [barrosmartin](https://wordpress.org/support/users/barrosmartin/)
 * (@barrosmartin)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601730)
 * Muchas gracias **fionaredmond** me re sirvio!
    me canse de buscarle una solucion
   al tema ! =)
 *  [JavierNunez](https://wordpress.org/support/users/javiernunez/)
 * (@javiernunez)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601752)
 * It worked for me!!!
    Thank you very much!!!
 *  [andy_bul](https://wordpress.org/support/users/andy_bul/)
 * (@andy_bul)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601753)
 * Great, it’s work.
 * Thank you!!!
 *  [fabyouless](https://wordpress.org/support/users/fabyouless/)
 * (@fabyouless)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601755)
 * My hand was forced. Even though our self-hosted WordPress was reported as version
   3.8.1 by GoDaddy, parts of it had been upgraded to version 4.1.1 without our 
   consent. How else could `wp_json_encode()` show up in `misc.php`? This function
   was’nt even introduced until version 4.1.
 * Please just go ahead and bite the bullet, do the upgade, and mark this as **_resolved_**,
   even though we will likely never find out what caused the problem.

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

The topic ‘Fatal error in misc.php’ is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 6 participants
 * Last reply from: [fabyouless](https://wordpress.org/support/users/fabyouless/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-in-miscphp/#post-5601755)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
