Skip to content

Commit aa34ede

Browse files
committed
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
1 parent 3b060c1 commit aa34ede

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/general-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ function wp_get_archives( $args = '' ) {
11921192
$r['type'] = 'monthly';
11931193
}
11941194

1195-
if ( '' != $r['limit'] ) {
1195+
if ( ! empty( $r['limit'] ) ) {
11961196
$r['limit'] = absint( $r['limit'] );
11971197
$r['limit'] = ' LIMIT ' . $r['limit'];
11981198
}

0 commit comments

Comments
 (0)