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
This commit is contained in:
Scott Taylor 2014-05-23 18:28:14 +00:00
parent 3214d6d325
commit f50d5233f3
1 changed files with 1 additions and 1 deletions

View File

@ -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'];
}