WordPress.org

Ready to get started?Download WordPress

Forums

Wrong datatype & Bad arguments warnings from query.php (2 posts)

  1. peatpod
    Member
    Posted 5 years ago #

    I have just installed wordpress on my test debian server to get to know the application. I have these errors at the top of the page, and don't know how to resolve them.

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/peatblog/public_html/wp-includes/query.php on line 2302

    Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/peatblog/public_html/wp-includes/query.php on line 2318

    Warning: implode() [function.implode]: Bad arguments. in /home/peatblog/public_html/wp-includes/query.php on line 2318

    The section in query.php that these errors refer to is this (I have indicated the lines the errors refer to):

    // Put sticky posts at the top of the posts array
    
    Line 2302:			for ( $i = 0; $i < $num_posts; $i++ ) {
    				if ( in_array($this->posts[$i]->ID, 
    
    			// Fetch sticky posts that weren't in the query results
    			if ( !empty($sticky_posts) ) {
    Line 2318:				$stickies__in = implode(',', array_map( 'absint', $sticky_posts ));

    Has naybody come across these errors and know how to resolve them.

    Thank you in advance.

  2. kilpatrick
    Member
    Posted 4 years ago #

    Its just so frustrating how many questions go unanswered in this place. Must be the most inactive support forum around. Im just searching for an answer to similar problems and every topic has no replies. Unbelievable.

Topic Closed

This topic has been closed to new replies.

About this Topic