diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php index 64397f2..2db6aab 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php @@ -65,6 +65,7 @@ public function getMultiple(array $keys) { // @todo: Perhaps if the database is never going to be available, // key/value requests should return FALSE in order to allow exception // handling to occur but for now, keep it an array, always. + // https://www.drupal.org/node/2787737 $this->catchException($e); } return []; diff --git a/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php b/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php index d56004e..8035a0e 100644 --- a/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php +++ b/core/lib/Drupal/Core/KeyValueStore/KeyValueStoreInterface.php @@ -48,7 +48,8 @@ public function get($key, $default = NULL); * @return array * An associative array of items successfully returned, indexed by key. * - * @todo What's returned for non-existing keys? + * @todo Determine the best return value for non-existing keys in + * https://www.drupal.org/node/2787737 */ public function getMultiple(array $keys); diff --git a/core/modules/file/src/Entity/File.php b/core/modules/file/src/Entity/File.php index e106a12..b82d5a8 100644 --- a/core/modules/file/src/Entity/File.php +++ b/core/modules/file/src/Entity/File.php @@ -188,10 +188,10 @@ public static function preCreate(EntityStorageInterface $storage, array &$values public function preSave(EntityStorageInterface $storage) { parent::preSave($storage); - // the file itself might not exist or be available right now. - $uri = $this->getfileuri(); + // The file itself might not exist or be available right now. + $uri = $this->getFileUri(); if ($size = @filesize($uri)) { - $this->setsize($size); + $this->setSize($size); } }