Title: [Plugin: Wp CSS] invalid argument after upgrade
Last modified: August 19, 2016

---

# [Plugin: Wp CSS] invalid argument after upgrade

 *  Resolved [geggiot](https://wordpress.org/support/users/geggiot/)
 * (@geggiot)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-css-invalid-argument-after-upgrade/)
 * I have upgrade from 2.6.1 to 2.6.2 and now wp css plugin give me this error `
   Warning: Invalid argument supplied for foreach() in /plugins/wp-css/wp-css-files-
   list.php on line 295`
 * this is function that doesnt work `function wp_css_files_for_post()
    { global
   $post;
 *  $array = get_post_meta($post->ID, ‘wp_css_file’);
 *  if (count($array) > 0) {
    $string = ”; $string .= “<!– WP CSS –>\n”;
 *  foreach ($array as $value) {
    if (function_exists(‘wp_css’)) { $string .= ‘<
   link rel=”stylesheet” href=”‘.wp_css($value, false).'” type=”text/css” media=”
   screen,projection” charset=”utf-8″ />’.”\n”; } else { $string .= ‘<link rel=”
   stylesheet” href=”‘.get_stylesheet_directory_uri().’/’.$value.'” type=”text/css”
   media=”screen,projection” charset=”utf-8″ />’.”\n”; }
 *  }
 *  $string .= “<!– WP CSS closes –>\n”;
    echo $string; } }`
 * Can anyone help me?
    Thanks

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

 *  Thread Starter [geggiot](https://wordpress.org/support/users/geggiot/)
 * (@geggiot)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-css-invalid-argument-after-upgrade/#post-854558)
 * any help?
 *  [halmat](https://wordpress.org/support/users/halmat/)
 * (@halmat)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-css-invalid-argument-after-upgrade/#post-854572)
 * A fix shall be released within this week.

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

The topic ‘[Plugin: Wp CSS] invalid argument after upgrade’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [halmat](https://wordpress.org/support/users/halmat/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-css-invalid-argument-after-upgrade/#post-854572)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
