 gelf.module | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gelf.module b/gelf.module
index dab2c0a..f6c8b88 100644
--- a/gelf.module
+++ b/gelf.module
@@ -25,7 +25,7 @@ function gelf_permission() {
  */
 function gelf_watchdog($entry) {
   if (!gelf_require()) {
-    if(user_access('administer gelf')) {
+    if(function_exists('user_access') && user_access('administer gelf')) {
       drupal_set_message(t('GELF module requires the GELF PHP library to be installed.  View the README for installation instructions.'), 'error');
     }
     return;
@@ -61,7 +61,7 @@ function gelf_watchdog($entry) {
     $publisher->publish($gelf);
   }
   catch (UnexpectedValueException $e) {
-    if(user_access('administer gelf')) {
+    if(function_exists('user_access') && user_access('administer gelf')) {
       drupal_set_message(t('Failed to publish gelf message: %message', array('%message' => $e->getMessage())), 'error');
     }
   }
