Issue #1282108 by pfrenssen, offerman: Fixed strict warnings.
authorpfrenssen
Thu, 8 Dec 2011 15:45:55 +0000 (16:45 +0100)
committerSascha Grossenbacher
Thu, 8 Dec 2011 15:45:55 +0000 (16:45 +0100)
privatemsg.module

index 1cbabb2..7b49727 100644 (file)
@@ -85,14 +85,16 @@ function _privatemsg_generate_user_array($string, $slice = NULL) {
   $participants = array();
   foreach ($users as $uid) {
     // If it is an integer, it is a user id.
-    if ((int)$uid > 0 && ($account = array_shift(privatemsg_user_load_multiple(array($uid))))) {
+    $user_ids = privatemsg_user_load_multiple(array($uid));
+    if ((int)$uid > 0 && ($account = array_shift($user_ids))) {
       $participants[privatemsg_recipient_key($account)] = $account;
     }
     elseif (strpos($uid, '_') !== FALSE) {
       list($type, $id) = explode('_', $uid);
       $type_info = privatemsg_recipient_get_type($type);
       if ($type_info && isset($type_info['load']) && is_callable($type_info['load'])) {
-        if ($participant = array_shift($type_info['load'](array($id)))) {
+        $temp_load = $type_info['load'](array($id));
+        if ($participant = array_shift($temp_load)) {
           $participants[privatemsg_recipient_key($participant)] = $participant;
         }
       }