Skip to content
Snippets Groups Projects
Commit c1927b84 authored by Viktor Holovachek's avatar Viktor Holovachek
Browse files

Issue #3105671 - Fix query

parent 316f2fd1
No related branches found
No related tags found
1 merge request!2Issue #3105671 - Fix query
Pipeline #107698 failed
......@@ -76,7 +76,7 @@ class BrowscapService {
// The useragent column contains the wildcarded pattern to match against
// our full-length string while the ORDER BY chooses the most-specific
// matching pattern.
$user_agent_properties = Database::getConnection()->query("SELECT * FROM {browscap} WHERE :useragent LIKE useragent ORDER BY LENGTH(useragent) DESC", [':useragent' => $user_agent])
$user_agent_properties = Database::getConnection()->query("SELECT * FROM {browscap} WHERE LOWER(:useragent) LIKE LOWER(useragent) ORDER BY LENGTH(useragent) DESC", [':useragent' => $user_agent])
->fetchObject();
// Serialize the property data for caching.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment