How to Fix Fatal error: Call to undefined function screen_icon()
I was updating a blog the other day DownloadHoyleGames.com, that I own and everything worked fine until I decided to log into the admin interface. As soon as I tried to go to the wp-admin login I was greeted with the following error message from WordPress:
Fatal error: Call to undefined function screen_icon() in /wp-admin/includes/file.php on line 1000
I tried updating WordPress manually with the procedure outlined in my post How to Recover From a Failed WordPress Upgrade, however the error remained when I tried to access the admin interface.
So, I was left with manually viewing and editing the file.php and fixing it. I used my FTP program to transfer the file.php file from my website to my computer. Then used Notepad++ to view the file.
On line 1000, I found the following php code that WordPress did not like.
<?php screen_icon(); ?>
Even though this function is defined in screen.php in the admin/includes folder, WordPress was breaking because of a simple icon being displayed on the screen. I admit, there is probably a deeper reason for the screen_icon() function not working, an incompatibility somewhere in WordPress and possibly the theme I am using, but my simple solution works to restore the functionality of WordPress’ admin admin interface and get on with the rest of the day.
The solution was simply to delete this line from the file.php file, save it and upload it back to the server. Problem solved and I can now access the admin interface.
Filed under: Errors
Like this post? Subscribe to my RSS feed and get loads more!