• Resolved sudhir4all

    (@sudhir4all)


    Hello

    In some newly inserted posts we are getting below error , and surprisingly old posts shows properly on live site. connections and other variables are correctly defined in wp-config.php.

    Below error faced in post detail page client side.

    Fatal error: Cannot use object of type WP_Error as array in /www/wp-includes/http.php on line 1217

    Regards
    Sudhir

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Default theme (WordPress 1.5 – 2.9.2) or the Twenty Ten theme (WordPress 3.0 and higher) to rule-out a theme-specific issue.

    Thread Starter sudhir4all

    (@sudhir4all)

    Hi, James
    Thanks for your reply, i have deactivated sexy-bookmarks and its works, but i don’t know why old posts are displayed properly in presence of sexy-bookmark plug in, only some new posts are effected.

    Moderator James Huff

    (@macmanx)

    You’re welcome! I’m not sure why it was affecting only certain posts, but the problem was definitely the plugin.

    I had same problem and found a way to fix it so I can keep sexybookmarks plugin active.
    If you want to do same here is how:

    [1]
    Find file /wp-content/plugins/sexybookmarks/includes/helper-functions.php
    – go to line #36 ($response = wp_remote_retrieve_response_code($request);)
    – insert new line just before it: $response = (array)$response;

    [2]
    Find file /wp-content/plugins/sexybookmarks/includes/public.php
    – go to line 19 ($url_request = wp_remote_request($url, $request_params);)
    – change that line to this: $url_request = (array)wp_remote_request($url, $request_params);

    As you can see its just matter of type casting.

    PBigs

    (@bigsalright)

    So many thanks BorisO !!

    Your solution is exactly what i needed !

    I run on WordPress 2.7.1.

    For me, in the Sexybookmarks.3.2.4.2 version, the [2] modification is not at line 19, but at line 272.

    See ya !

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Cannot use object of type WP_Error as array’ is closed to new replies.