Skip to content

Commit 9051fd5

Browse files
committed
Fix error if sql statement caching fails
1 parent 3b82dce commit 9051fd5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wcmf/lib/model/mapper/SelectStatement.php

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public static function get(RDBMapper $mapper, $id=self::NO_CACHE) {
5454
}
5555
else {
5656
$selectStmt = $cache->get($cacheSection, $cacheId);
57+
if (!$selectStmt) {
58+
$selectStmt = new SelectStatement($mapper, $id);
59+
}
5760
$selectStmt->adapter = $mapper->getAdapter();
5861
}
5962
return $selectStmt;

0 commit comments

Comments
 (0)