Skip to content

Commit c356e0a

Browse files
committed
Whitelist use of hard-coded SQL query parts
1 parent 2fc941c commit c356e0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Option_Command.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,12 @@ public function list_( $args, $assoc_args ) {
302302
}
303303
$where .= $autoload_query . $transients_query;
304304

305+
// phpcs:disable WordPress.DB.PreparedSQL -- Hardcoded query parts without user input.
305306
$results = $wpdb->get_results(
306307
'SELECT `option_name`,`option_value`,`autoload`' . $size_query
307308
. " FROM `$wpdb->options` {$where}"
308309
);
310+
// phpcs:enable
309311

310312
$orderby = Utils\get_flag_value( $assoc_args, 'orderby' );
311313
$order = Utils\get_flag_value( $assoc_args, 'order' );

0 commit comments

Comments
 (0)