Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / views / src / Plugin / views / display / EntityReference.php
index 73b137ce03e7e300f5d3db5687fd770f420a7600..eb5f04cfea0a82c8d778eef1c9901240f4469855 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace Drupal\views\Plugin\views\display;
 
+use Drupal\Core\Database\Query\Condition;
+
 /**
  * The plugin that handles an EntityReference display.
  *
@@ -88,13 +90,16 @@ class EntityReference extends DisplayPluginBase {
   }
 
   /**
-   * {@inheritdoc}
+   * Builds the view result as a renderable array.
+   *
+   * @return array
+   *   Renderable array or empty array.
    */
   public function render() {
     if (!empty($this->view->result) && $this->view->style_plugin->evenEmpty()) {
       return $this->view->style_plugin->render($this->view->result);
     }
-    return '';
+    return [];
   }
 
   /**
@@ -131,7 +136,7 @@ class EntityReference extends DisplayPluginBase {
       }
 
       // Multiple search fields are OR'd together.
-      $conditions = db_or();
+      $conditions = new Condition('OR');
 
       // Build the condition using the selected search fields.
       foreach ($style_options['options']['search_fields'] as $field_id) {