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:
parent
3214d6d325
commit
f50d5233f3
|
@ -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'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue