mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 13:13:33 +09:00
* fixed CVE-2024-12276;
* reviewed using $wpdb and WPCS; * set minimum required version to 6.2 due to using %i for $wpdb->prepare;
This commit is contained in:
@@ -89,13 +89,12 @@ if ( ! class_exists( 'um\core\Query' ) ) {
|
||||
"SELECT *
|
||||
FROM {$wpdb->posts}
|
||||
WHERE post_type = 'page' AND
|
||||
post_status = 'publish'",
|
||||
OBJECT
|
||||
post_status = 'publish'"
|
||||
);
|
||||
|
||||
$array = array();
|
||||
if( $wpdb->num_rows > 0 ){
|
||||
foreach ($pages as $page_data) {
|
||||
if ( $wpdb->num_rows > 0 ) {
|
||||
foreach ( $pages as $page_data ) {
|
||||
$array[ $page_data->ID ] = $page_data->post_title;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user