• After the latest update (3.8.3), noticed I’m getting the log filled with these after saving the frontpage:

    PHP Warning: unlink() expects parameter 1 to be a valid path, object given in /wp-content/plugins/wp-seopress/inc/admin/ajax.php on line 342

    Tried re-installing the plugin but it doesn’t help.

    The frontpage isn’t an ordinary post/page. It’s based on the Flatsome theme and all componentized with stuff like this: [ux_slider] etc.

    EDIT:
    According this question, added a check to the incumbent line and it seems to work now:

    if (@file_exists($img_src)) {
        unlink($img_src);
    }

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,

    can you share the URL of your page please?

    Shortcodes/page builders doesn’t matter, we read the source code of your page like a bot (GoogleBot for example).

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Replace the code in the plugin by this one:

    $img_src = download_url($img->getAttribute('src'));
                                        if (is_wp_error($img_src) === false) {
                                            if (filesize($img_src) > 100) {//Ignore files under 100 bytes
                                                $data_img[] .= $img->getAttribute('src');
                                            }
                                            @unlink($img_src);
                                        } 
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘unlink() expects parameter 1 to be a valid path, object given’ is closed to new replies.