mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 09:03:09 +01:00
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
This commit is contained in:
parent
3b060c1931
commit
aa34ede226
@ -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…
x
Reference in New Issue
Block a user