diff --git a/core/lib/Drupal/Core/Database/Query/Condition.php b/core/lib/Drupal/Core/Database/Query/Condition.php index 0beb716..2b9574e 100644 --- a/core/lib/Drupal/Core/Database/Query/Condition.php +++ b/core/lib/Drupal/Core/Database/Query/Condition.php @@ -198,6 +198,12 @@ public function compile(Connection $connection, PlaceholderInterface $queryPlace // Provide a string which will result into an empty query result. $this->stringVersion = '( AND 1 = 0 )'; + // Conceptually throwing an exception caused by user input is bad + // as you result into a WSOD, which depending on your webserver + // configuration can result into the assumption that your site is + // broken. + // On top of that the database API relies on __toString() which + // does not allow to throw exceptions. trigger_error('Invalid characters in query operator: ' . $condition['operator'], E_USER_ERROR); return; }