summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-12 12:26:08 -0800
committerBrion Vibber <brion@pobox.com>2010-01-12 12:28:24 -0800
commit2b10e359fea9d6aabc5ab35557954a503bea730b (patch)
treeb4e13eab2fc1030b8979234bb909a151b307494c /lib
parent4cc9b183d797cbd3d1f6230a46cb5df6e6161dbb (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')
-rw-r--r--lib/api.php2
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;
}