We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4dfbe78c authored by P. J. McDermott's avatar P. J. McDermott

Catch User::__construct() Exceptions in data classes.

parent 1026059e
......@@ -316,7 +316,9 @@ class Group {
if ($res)
{
foreach($res as &$row) {
$this->users[ $row['username'] ] = new User($row['username'], $row);
try {
$this->users[$row['username']] = new User($row['username'], $row);
} catch (Exception $e) {}
}
}
......
......@@ -94,7 +94,11 @@ class User {
$row = $adodb->CacheGetRow(7200, $query);
if ($row) {
return new User($row['username'], $row);
try {
return new User($row['username'], $row);
} catch (Exception $e) {
return false;
}
} else {
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment