Skip to content

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

Open
sergant210 wants to merge 1 commit intomodxcms:3.xfrom
sergant210:ImproveLogMessageEncounteredEmptyIn
Open

Improve log message "Encountered empty IN condition with key id"#191
sergant210 wants to merge 1 commit intomodxcms:3.xfrom
sergant210:ImproveLogMessageEncounteredEmptyIn

Conversation

@sergant210
Copy link

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

@cla-bot cla-bot bot added the cla-signed CLA confirmed for all contributors to this PR label Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed CLA confirmed for all contributors to this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant