Skip to content

Commit 0ec5d46

Browse files
committed
Fixes #2
1 parent 4ed3b8b commit 0ec5d46

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Smoke/Cache/Storage/Adapter/RedisArrayResourceManager.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,8 @@ public function getMayorVersion($id)
560560
*/
561561
public function getMajorVersion($id)
562562
{
563-
if (!$this->hasResource($id)) {
564-
throw new Exception\RuntimeException("No resource with id '{$id}'");
565-
}
563+
// check resource id and initialize the resource
564+
$this->getResource($id);
566565

567566
$resource = & $this->resources[$id];
568567
return (int) $resource['version'];

0 commit comments

Comments
 (0)