• I have this problem.

    Warning: strpos() expects parameter 1 to be string, object given in /home/faizalia/public_html/wp-includes/post.php on line 277

    Warning: preg_match() expects parameter 2 to be string, object given in /home/faizalia/public_html/wp-includes/post.php on line 277

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/faizalia/public_html/wp-includes/post.php on line 278

    ============

    Line 277 : if ( $file && 0 !== strpos( $file, ‘/’ ) && ! preg_match( ‘|^.:\\|’, $file ) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads[‘error’] ) ) {

    Line 278: $file = $uploads[‘basedir’] . “/$file”;

    =============

    Any solutions?

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

    (@macmanx)

    If you have access to your Dashboard, try deactivating all plugins. If you don’t have access to your admin panel, try manually resetting your plugins (no Dashboard access required). 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 Twenty Seventeen theme to rule-out a theme-specific issue. If you don’t have access to your admin panel, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue.

    Thread Starter seriusmedia

    (@seriusmedia)

    Hi.. Thanks for reply.

    But, issue not resolve.. I tried to deactivate all plugin and use default theme. I get same problem.

    I can see this error just on Dashboard >>> Media >>>Library.

    This is screen shot. >>> https://www.awesomescreenshot.com/image/2446912/8a4666fa1fc35583a8ef254afa9daeef

    I dont know what problem.

    Moderator James Huff

    (@macmanx)

    Ok, try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Thread Starter seriusmedia

    (@seriusmedia)

    Not working… ??

    Thread Starter seriusmedia

    (@seriusmedia)

    Can I hire you to fix this problem? @macmanx

    Moderator James Huff

    (@macmanx)

    Not me, but yes you may need to give someone direct access to more thoroughly investigate the situation.

    Please try https://jobs.wordpress.net/ or https://jetpack.pro/ and do not accept any hire or direct access offers posted to these forums.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Warning: strpos() expects parameter 1 to be string, object given in’ is closed to new replies.