diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-12 12:26:08 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-12 12:28:24 -0800 |
commit | 2b10e359fea9d6aabc5ab35557954a503bea730b (patch) | |
tree | b4e13eab2fc1030b8979234bb909a151b307494c /lib/api.php | |
parent | 4cc9b183d797cbd3d1f6230a46cb5df6e6161dbb (diff) |
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)
Diffstat (limited to 'lib/api.php')
-rw-r--r-- | lib/api.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php index d21851d50..707e4ac21 100644 --- a/lib/api.php +++ b/lib/api.php @@ -168,7 +168,7 @@ class ApiAction extends Action $timezone = 'UTC'; - if ($user->timezone) { + if (!empty($user) && $user->timezone) { $timezone = $user->timezone; } |