From f50d5233f3a45679c1ca903536d932eba305986c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 23 May 2014 18:28:14 +0000 Subject: [PATCH] Truly check for `! empty()` instead of falsey `''` when determining whether to add `LIMIT` clause to SQL in `wp_get_archives()`. Props jjeaton for the initial patch. Fixes #27834. Built from https://develop.svn.wordpress.org/trunk@28560 git-svn-id: http://core.svn.wordpress.org/trunk@28386 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index a5347c38ee..922ab8fb84 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1192,7 +1192,7 @@ function wp_get_archives( $args = '' ) { $r['type'] = 'monthly'; } - if ( '' != $r['limit'] ) { + if ( ! empty( $r['limit'] ) ) { $r['limit'] = absint( $r['limit'] ); $r['limit'] = ' LIMIT ' . $r['limit']; }