Ask me a question at the Wordpress Ninja Forum
How To Fix Code Errors On Page
Posted on August 1, 2008
Filed Under Wordpress Solutions |
I’ve received a few issues from people whose sites display fine, but at the top it has some error message such as this example:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /xxxxx…./xxxxxx/url/blog/wp-includes/widgets.php on line 60
Note the URL address given. Believe it or not, this error is actually very descriptive and tells us all we need to know. First up, any problem with any file in the /wp-includes/ folder should not happen unless one of those core files is modified somehow. So for the record, let me reiterate that these files should not ever need to be touched - they are Wordpress core code files that are essential to the functioning of the site and are not to be edited by anyone.
So if they have been modified or corrupted as has this example above (widgets.php) all you need to do is to replace the existing (corrupted) file with the original one from the Wordpress install files. If you are using Wordpress version 2.5.1 for example, download the install files from here and extract it to your desktop. Find that same file (in this example was /wp-includes/widgets.php) and upload it to your server into the same path - overwriting the existing (corrupted) file.
One final note - you should not actually ever have to modify any file outside of your theme folder e.g. /wp-content/themes/mytheme/ as these will be core Wordpress files.
That should do the trick. As always, if you still are stuck you can send me the file and i’ll take a look at it.
Comments
Leave a Reply
Related Posts:
Hi, i am the Wordpress Ninja. My name is Paul and my goal is to be able to answer everyone's Wordpress questions (for free) and post the best solutions on this blog. So for all questions and issues please post in the