[drupal] handle $user->roles = NULL condition
This commit is contained in:
parent
90f4f8be8c
commit
44cb03fb76
|
@ -319,7 +319,7 @@ function _logger_dashboard($type, $function, $interval) {
|
||||||
WHERE uid = %d AND type = '%s' AND function = '%s'
|
WHERE uid = %d AND type = '%s' AND function = '%s'
|
||||||
ORDER BY created", $user->uid, $type, $function));
|
ORDER BY created", $user->uid, $type, $function));
|
||||||
|
|
||||||
if (in_array('pro', array_values($user->roles)))
|
if (is_array($user->roles) && in_array('pro', array_values($user->roles)))
|
||||||
$result_me = db_query("SELECT meter, function
|
$result_me = db_query("SELECT meter, function
|
||||||
FROM {logger_meters}
|
FROM {logger_meters}
|
||||||
WHERE uid = %d AND type = '%s' and chart = %d
|
WHERE uid = %d AND type = '%s' and chart = %d
|
||||||
|
|
Loading…
Reference in New Issue