$r = array();
if (!$direct_cache && ($cachefile == '')) {
- $r = dba::select('photo', array('data', 'desc'), array('resource-id' => $urlhash), array('limit' => 1));
+ $r = dba::selectOne('photo', ['data', 'desc'], ['resource-id' => $urlhash]);
if (DBM::is_result($r)) {
$img_str = $r['data'];
$mime = $r['desc'];