From 3819f61f46be343874de694132397f2a51e8310a Mon Sep 17 00:00:00 2001
From: Sascha Grossenbacher <saschagros@gmail.com>
Date: Tue, 26 Apr 2011 07:07:58 +0200
Subject: [PATCH] Issue #1137910 by Berdir: Fixed E_STRICT notice.

---
 userpoints.module |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/userpoints.module b/userpoints.module
index 88fba97..f591847 100644
--- a/userpoints.module
+++ b/userpoints.module
@@ -1686,7 +1686,8 @@ function userpoints_create_description($transaction, array $options = array()) {
   // Check if there is a valid entity referenced and which can be linked to.
   $entity = NULL;
   if ($transaction->entity_type && entity_get_info($transaction->entity_type)) {
-    $entity = reset(entity_load($transaction->entity_type, array($transaction->entity_id)));
+    $entity = entity_load($transaction->entity_type, array($transaction->entity_id));
+    $entity = reset($entity);
   }
   $safe = FALSE;
   // Check transaction description first to allow custom overrides.
-- 
1.7.4.1

