mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:40:17 +00:00
Fix errors in Core namespace
This commit is contained in:
parent
2b81529844
commit
c1c158ccda
2 changed files with 9 additions and 1 deletions
|
@ -182,7 +182,11 @@ class DatabaseLock extends AbstractLock
|
|||
}
|
||||
|
||||
$stmt = $this->dba->select('locks', ['name'], $where);
|
||||
} catch (\Exception $exception) {
|
||||
throw new LockPersistenceException(sprintf('Cannot get lock with prefix %s', $prefix), $exception);
|
||||
}
|
||||
|
||||
try {
|
||||
$keys = [];
|
||||
while ($key = $this->dba->fetch($stmt)) {
|
||||
array_push($keys, $key['name']);
|
||||
|
|
|
@ -60,7 +60,11 @@ class PConfig
|
|||
} else {
|
||||
$configs = $this->db->select(static::$table_name, ['cat', 'v', 'k'], ['cat' => $cat, 'uid' => $uid]);
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception);
|
||||
}
|
||||
|
||||
try {
|
||||
while ($config = $this->db->fetch($configs)) {
|
||||
$key = $config['k'];
|
||||
$value = ValueConversion::toConfigValue($config['v']);
|
||||
|
@ -71,7 +75,7 @@ class PConfig
|
|||
}
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
throw new PConfigPersistenceException(sprintf('Cannot load config category %s for user %d', $cat, $uid), $exception);
|
||||
throw new PConfigPersistenceException(sprintf('Cannot load config category "%s" for user %d', $cat, $uid), $exception);
|
||||
} finally {
|
||||
$this->db->close($configs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue