mirror of
https://github.com/friendica/friendica
synced 2025-01-18 14:24:28 +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);
|
$stmt = $this->dba->select('locks', ['name'], $where);
|
||||||
|
} catch (\Exception $exception) {
|
||||||
|
throw new LockPersistenceException(sprintf('Cannot get lock with prefix %s', $prefix), $exception);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$keys = [];
|
$keys = [];
|
||||||
while ($key = $this->dba->fetch($stmt)) {
|
while ($key = $this->dba->fetch($stmt)) {
|
||||||
array_push($keys, $key['name']);
|
array_push($keys, $key['name']);
|
||||||
|
|
|
@ -60,7 +60,11 @@ class PConfig
|
||||||
} else {
|
} else {
|
||||||
$configs = $this->db->select(static::$table_name, ['cat', 'v', 'k'], ['cat' => $cat, 'uid' => $uid]);
|
$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)) {
|
while ($config = $this->db->fetch($configs)) {
|
||||||
$key = $config['k'];
|
$key = $config['k'];
|
||||||
$value = ValueConversion::toConfigValue($config['v']);
|
$value = ValueConversion::toConfigValue($config['v']);
|
||||||
|
@ -71,7 +75,7 @@ class PConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $exception) {
|
} 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 {
|
} finally {
|
||||||
$this->db->close($configs);
|
$this->db->close($configs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue