From 28777ee3c46b786826a6ec10b6925f6937322814 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 6 Nov 2012 23:27:21 +0000 Subject: [PATCH] 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 --- wp-admin/includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 5ce1064922..f4e656363a 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -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; }