From aa34ede226156b5b1a57f084534e47ffba9df875 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 23 May 2014 18:27:10 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@28560 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index a5347c38ee..922ab8fb84 100644 --- a/src/wp-includes/general-template.php +++ b/src/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']; }