diff --git a/core/modules/user/lib/Drupal/user/TempStore.php b/core/modules/user/lib/Drupal/user/TempStore.php
index c8a6dd1..4a0be54 100644
--- a/core/modules/user/lib/Drupal/user/TempStore.php
+++ b/core/modules/user/lib/Drupal/user/TempStore.php
@@ -140,7 +140,7 @@ function set($key, $value) {
       if (!$this->lockBackend->acquire($key)) {
         throw new TempStoreException(format_string("Couldn't acquire lock to update item %key in %collection temporary storage.", array(
           '%key' => $key,
-          '%collection' => $this->storage->collection,
+          '%collection' => $this->storage->getCollectionName(),
         )));
       }
     }
@@ -186,7 +186,7 @@ function delete($key) {
       if (!$this->lockBackend->acquire($key)) {
         throw new TempStoreException(format_string("Couldn't acquire lock to delete item %key from %collection temporary storage.", array(
           '%key' => $key,
-          '%collection' => $this->storage->collection,
+          '%collection' => $this->storage->getCollectionName(),
         )));
       }
     }
