diff --git a/search_api_db/src/Plugin/search_api/backend/Database.php b/search_api_db/src/Plugin/search_api/backend/Database.php
index 227bbac..9b097e1 100644
--- a/search_api_db/src/Plugin/search_api/backend/Database.php
+++ b/search_api_db/src/Plugin/search_api/backend/Database.php
@@ -1320,7 +1320,7 @@ class Database extends BackendPluginBase {
         foreach ($sort as $field_name => $order) {
           if ($order != 'ASC' && $order != 'DESC') {
             $msg = $this->t('Unknown sort order @order. Assuming "ASC".', array('@order' => $order));
-            $this->warnings[$msg] = $msg;
+            $this->warnings[(string) $msg] = 1;
             $order = 'ASC';
           }
           if ($field_name == 'search_api_relevance') {
@@ -1426,12 +1426,12 @@ class Database extends BackendPluginBase {
       else {
         $this->getLogger()->warning('Search keys are given but no fulltext fields are defined.');
         $msg = $this->t('Search keys are given but no fulltext fields are defined.');
-        $this->warnings[$msg] = 1;
+        $this->warnings[(string) $msg] = 1;
       }
     }
     elseif ($keys_set) {
       $msg = $this->t('No valid search keys were present in the query.');
-      $this->warnings[$msg] = 1;
+      $this->warnings[(string) $msg] = 1;
     }
 
     if (!isset($db_query)) {
@@ -1888,7 +1888,8 @@ class Database extends BackendPluginBase {
     $ret = array();
     foreach ($query->getOption('search_api_facets') as $key => $facet) {
       if (empty($fields[$facet['field']])) {
-        $this->warnings[] = $this->t('Unknown facet field @field.', array('@field' => $facet['field']));
+        $msg = $this->t('Unknown facet field @field.', array('@field' => $facet['field']));
+        $this->warnings[(string) $msg] = 1;
         continue;
       }
       $field = $fields[$facet['field']];
diff --git a/search_api_db/src/Tests/BackendTest.php b/search_api_db/src/Tests/BackendTest.php
index adf4238..589763d 100644
--- a/search_api_db/src/Tests/BackendTest.php
+++ b/search_api_db/src/Tests/BackendTest.php
@@ -384,7 +384,7 @@ class BackendTest extends EntityUnitTestBase {
     $this->assertEqual($results->getResultCount(), 3, 'Search for »foo« returned correct number of results.');
     $this->assertEqual(array_keys($results->getResultItems()), $this->getItemIds(array(1, 2, 3)), 'Search for »foo« returned correct result.');
     $this->assertIgnored($results, array('foo'), 'Short key was ignored.');
-    $this->assertWarnings($results, array($this->t('No valid search keys were present in the query.')), 'No warnings were displayed.');
+    $this->assertWarnings($results, array((string) $this->t('No valid search keys were present in the query.')), '"No valid keys" warning was displayed.');
 
     $keys = array(
       '#conjunction' => 'AND',
