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

Commit a0036c98 authored by P. J. McDermott's avatar P. J. McDermott

Catch User::__construct() Exceptions in API.

parent 0c2098de
......@@ -26,9 +26,10 @@ class UserXML {
public static function getInfo($username) {
$user = new User($username);
if (!$user) {
return(XML::error('failed', '7', 'Invalid resource specified'));
try {
$user = new User($username);
} catch (Exception $e) {
return XML::error('failed', '7', 'Invalid resource specified');
$xml = new SimpleXMLElement('<lfm status="ok"></lfm>');
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