From d5cf333b8675b9e1fdf719f2005cb8cd2a90e234 Mon Sep 17 00:00:00 2001
From: Angus Mak <angus.mak@lullabot.com>
Date: Fri, 7 Sep 2012 23:15:46 -0400
Subject: [PATCH] Issue #1778558 by makangus: Fixed Strict warning after
 creating a short url

---
 shurly.module |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/shurly.module b/shurly.module
index eec6ae9..395bd57 100644
--- a/shurly.module
+++ b/shurly.module
@@ -593,7 +593,8 @@ function shurly_rate_limit_allowed($account = NULL) {
   $settings = variable_get('shurly_throttle', array());
 
   if (is_array($account->roles)) {
-    $use_rid = array_shift(array_keys($account->roles));
+    $rids = array_keys($account->roles);
+    $use_rid = array_shift($rids);
     // get list of roles with permission to create short URLs
     $creating_roles = user_roles(FALSE, 'Create short URLs');
     foreach ($account->roles as $rid => $name) {
-- 
1.7.9.6 (Apple Git-31.1)

