diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php index b50f9cf..247d653 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php @@ -273,6 +273,9 @@ public static function sqlFunctionRegexp($pattern, $subject) { * @see https://sqlite.org/lang_expr.html#like */ public static function sqlFunctionLikeBinary($pattern, $subject) { + // Replace the SQL LIKE wildcard meta-characters with the equivalent regular + // expression meta-characters and escape the delimiter that will be used for + // matching. $pattern = str_replace(array('%', '_'), array('.*?', '.'), preg_quote($pattern, '/')); return preg_match('/^' . $pattern . '$/', $subject); }