Title: Invalid argument Error after installation
Last modified: August 20, 2016

---

# Invalid argument Error after installation

 *  [drmks24](https://wordpress.org/support/users/drmks24/)
 * (@drmks24)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/)
 * Hello,
 * I received a strange error at the backend and at the frontend as well which s:
 * Warning: Invalid argument supplied for foreach() in /var/www/virtual/mydomain/
   wp-includes/class-wp-admin-bar.php on line 353
 * What does this means and how can I fix this?
 * Here are some screenshots:
 * [http://img526.imageshack.us/img526/2020/wperror02.jpg](http://img526.imageshack.us/img526/2020/wperror02.jpg)
 * [http://imageshack.us/a/img201/1893/wperror01.jpg](http://imageshack.us/a/img201/1893/wperror01.jpg)
 * [http://imageshack.us/a/img69/1812/wperror03.jpg](http://imageshack.us/a/img69/1812/wperror03.jpg)
 * Thanks for your help!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392331)
 * Have you tried:
 * – deactivating **all** plugins to see if this resolves the problem. If this works,
   re-activate the plugins one by one until you find the problematic plugin(s).
 * – switching to the default theme to rule out any theme-specific problems.
 * – [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause
   problems.
 * – re-uploading all files & folders – **except** the wp-content folder – from 
   a **fresh** download of WordPress. Make sure that you delete the old copies of
   files & folder before uploading the new ones.
 *  Thread Starter [drmks24](https://wordpress.org/support/users/drmks24/)
 * (@drmks24)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392357)
 * Thanks for the quick reply but none of this will fix the problem because it is
   a fresh WP install.
 * – there are no active plugins
    – re-uploading a fresh download wordpress rar-
   file & uploading the files again after deleting all files except the wp-content
   folder doesn’t work – switching the theme back to the standart one doesn’t help(
   the error was also displayed before I’ve installed the theme)
 * Any other suggestions?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392360)
 * I’d still argue that you have a corrupted core file.
 *  Thread Starter [drmks24](https://wordpress.org/support/users/drmks24/)
 * (@drmks24)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392382)
 * I think so too but what else can I do then downloading the WP 3.5 rar-file again
   and replace the class-wp-admin-bar.php file?
 * I’ve downloaded it from this source:
 * [http://wordpress.org/download/](http://wordpress.org/download/)
 * I tried the zip-file and the tar.gz-file but the error is still there!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392383)
 * The download is fine for me. No corrupted files. All I can suggest is that you
   try again.
 *  Thread Starter [drmks24](https://wordpress.org/support/users/drmks24/)
 * (@drmks24)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392394)
 * Nothing happens after redownloading the rar-file over and over again so I just
   deleted the some code from line 353 from the class-wp-admin-bar.php and the error-
   message is gone.
 * Does anyone knows if this piece of code is important?
 * <?php foreach ( $root->children as $group ) {
    $this->_render_group( $group );}?
   >
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392415)
 * Every line in WordPress core files is important.
 *  [Tony](https://wordpress.org/support/users/antonioliscidini/)
 * (@antonioliscidini)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392500)
 * I have the same error after the installation!
 *  Thread Starter [drmks24](https://wordpress.org/support/users/drmks24/)
 * (@drmks24)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392502)
 * Today I found out that the problem is caused by our server. The server is a few
   years old and wie tried to work with a external php.protocol that caused the 
   errors because of a wrong or high security standart. Finally we decided to move
   our website to a new and more up to date server.
 * Maybe this information will help other ppl with the same problem!
 *  [Tony](https://wordpress.org/support/users/antonioliscidini/)
 * (@antonioliscidini)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392503)
 * I have found this solution
    add the following code at the beginning of your wp-
   config.php file after <?php
 * ini_set(‘zend.ze1_compatibility_mode’, 0);
 * For me worked very well

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

The topic ‘Invalid argument Error after installation’ is closed to new replies.

## Tags

 * [warning: invalid argument](https://wordpress.org/support/topic-tag/warning-invalid-argument/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [Tony](https://wordpress.org/support/users/antonioliscidini/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/invalid-argument-error-after-installation/#post-3392503)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
