Always return an integer from post_exists(). props barrykooij. fixes #21607.

git-svn-id: http://core.svn.wordpress.org/trunk@22410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-06 23:27:21 +00:00
parent 224a21db80
commit 28777ee3c4

View File

@ -498,7 +498,7 @@ function post_exists($title, $content = '', $date = '') {
}
if ( !empty ( $args ) )
return $wpdb->get_var( $wpdb->prepare($query, $args) );
return (int) $wpdb->get_var( $wpdb->prepare($query, $args) );
return 0;
}