xpdo icon indicating copy to clipboard operation
xpdo copied to clipboard

Improve log message "Encountered empty IN condition with key id"

Open sergant210 opened this issue 4 years ago • 0 comments

What does it do?

Improve log message "Encountered empty IN condition with key id".

How to test

  1. Try to execute the code. modalConsole can be used to do this.
$q = $modx->newQuery('modUser');
$q->where(['id:IN' => []]);
$q->prepare();
  1. Open the MODX error log.
[2021-03-06 17:41:24] (ERROR @ D:\Projects\modx.local\www\core\xpdo\om\xpdoquery.class.php : 656) Encountered empty IN condition with key id.
Query: SELECT `modUser`.`id` AS `modUser_id`, `modUser`.`username` AS `modUser_username`, `modUser`.`password` AS `modUser_password`, `modUser`.`cachepwd` AS `modUser_cachepwd`, `modUser`.`class_key` AS `modUser_class_key`, `modUser`.`active` AS `modUser_active`, `modUser`.`remote_key` AS `modUser_remote_key`, `modUser`.`remote_data` AS `modUser_remote_data`, `modUser`.`hash_class` AS `modUser_hash_class`, `modUser`.`salt` AS `modUser_salt`, `modUser`.`primary_group` AS `modUser_primary_group`, `modUser`.`session_stale` AS `modUser_session_stale`, `modUser`.`sudo` AS `modUser_sudo`, `modUser`.`createdon` AS `modUser_createdon` FROM `modx_users` AS `modUser` WHERE `modUser`.`id` IN () 

Related issue(s)/PR(s)

#155

sergant210 avatar Mar 06 '21 15:03 sergant210