Commit 2b10e359 authored by Brion Vibber's avatar Brion Vibber

Avoid PHP notice when outputting API data for remote users; no $user means no $user->timezone :)

Trying to get property of non-object (/srv/com.leuksman.status/lib/api.php:171)
parent 4cc9b183
......@@ -168,7 +168,7 @@ class ApiAction extends Action
$timezone = 'UTC';
if ($user->timezone) {
if (!empty($user) && $user->timezone) {
$timezone = $user->timezone;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment