Problem Description
Comments made in KeyValueStoreInterface point to the fact that the return value was not finalized
In KeyValueStoreInterface:
/** * Returns the stored key/value pairs for a given set of keys. * * @param array $keys * A list of keys to retrieve. * * @return array * An associative array of items successfully returned, indexed by key. * * @todo What's returned for non-existing keys? */ public function getMultiple(array $keys);In DatabaseStorageExpirable:
/** * {@inheritdoc} */ public function getMultiple(array $keys) { . . . catch (\Exception $e) { // @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. $this->catchException($e); } return [];
Possible solution
Revise the return value to handle error conditions as mentioned above.
Comments
Comment #2
dawehnerBeside the choice we go with, we should make it consistent between state, cache and key_value.
One small detail we maybe should take into account: the get method returns NULL, by default, so maybe we should do the same here, if we want to do so.
Comment #16
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #18
smustgrave commentedThis is still the case