[drupal] handle $user->roles = NULL condition

This commit is contained in:
Bart Van Der Meerssche 2011-03-21 21:14:01 +00:00
parent 90f4f8be8c
commit 44cb03fb76
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ function _logger_dashboard($type, $function, $interval) {
WHERE uid = %d AND type = '%s' AND function = '%s'
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
FROM {logger_meters}
WHERE uid = %d AND type = '%s' and chart = %d