Forums

[resolved] [Plugin: Wp CSS] invalid argument after upgrade (3 posts)

  1. geggiot
    Member
    Posted 3 years ago #

    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

  2. geggiot
    Member
    Posted 3 years ago #

    any help?

  3. halmat
    Member
    Posted 3 years ago #

    A fix shall be released within this week.

Topic Closed

This topic has been closed to new replies.

About this Topic