fix(db): correct $wpdb->prepare usage in forum board and API audit
- Bind _aksrt_moderators with %s in get_user_managed_plates (stops 4× user-home notices) - Guard API audit COUNT when no filter values (credits pattern)
This commit is contained in:
1 parent
1119d65c05
commit
f6617c1f07
2 files changed
+6
-4
No files matched your search
@@ -699,7 +699,8 @@ trait AKSRT_Forum_Board_Service_Part_2 {
|
||||
$mod_plate_ids = $wpdb->get_col($wpdb->prepare(
|
||||
"SELECT pm.post_id FROM {$wpdb->postmeta} pm
|
||||
INNER JOIN {$wpdb->posts} p ON p.ID = pm.post_id AND p.post_type = 'aksrt_forum_plate' AND p.post_status = 'publish'
|
||||
WHERE pm.meta_key = '_aksrt_moderators'",
|
||||
WHERE pm.meta_key = %s",
|
||||
'_aksrt_moderators'
|
||||
));
|
||||
|
||||
foreach ($mod_plate_ids as $plate_id) {
|
||||
|
||||
Reference in new issue
Block a user