Fix undefined array key warning

This commit is contained in:
Tetrakern 2024-09-18 09:44:25 +02:00
parent 4788573335
commit 0154155d83

View File

@ -1072,9 +1072,9 @@ if ( ! current_user_can( 'manage_options' ) ) {
global $current_user, $pagenow;
// Only affect media library on admin side
if(
'admin-ajax.php' != $pagenow ||
$_REQUEST['action'] != 'query-attachments'
if (
'admin-ajax.php' !== $pagenow ||
( $_REQUEST['action'] ?? 0 ) !== 'query-attachments'
) {
return;
}