Support » Fixing WordPress » PHP Warning: post-template.php on line 1039

  • Resolved RockRealty

    (@rockrealty)


    I have been receiving the following error and now I can’t access any links to blogs or pages on my WP site. http://blog.rockrealtywi.com

    [04-Jan-2013 15:21:51] PHP Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home1/rockreic/public_html/blog/wp-includes/post-template.php on line 1039

Viewing 5 replies - 1 through 5 (of 5 total)
  • I believe this is the line 1039 that it’s talking about.

    if ( in_array( $page->ID, $_current_page->ancestors ) )

    The PHP warning means that $_current_page->ancestors does not have a datatype of ‘array.’

    What changes had you recently made to the site right before it broke?

    It looks like these errors started occurring back on Dec 27th and I had no idea. I don’t believe any changes were made at that point.

    Today I re-installed WP 3.5 to see if that fixed it. I also attempted a different theme.

    Same issues still.

    I resolved this by restoring a previous version of my .htaccess file in the WP root drive.

    Is anyone else seeing the error_log entry? I have tried a simple .htaccess and the issue persists.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: post-template.php on line 1039’ is closed to new replies.