In the code for upcoming birthdays, when there aren't enough results this year, the uid part is missing in the returned array.

This is solved in HEAD, but not in the release for 4-7. Can you please commit the patch (see last line)?

// If less than $limit results returned, look at next year
		
		$query = 'SELECT dob.uid, users.name, substring(birthday,6,2) as `month`, right(birthday, 2) as `day`'; 
		$query .= 'FROM {dob}, {users} WHERE users.uid = dob.uid AND DAYOFYEAR(birthday) >= 0 ';
		$query .= 'order by month, day limit 0,' . ($limit - db_num_rows($result));
	
		$result = db_query($query);

while ($user = db_fetch_object($result)) {
			        
			$month = _get_shortmonth($user->month);
			        
			$birthdays[] = array('name' => $user->name, 'uid' => $user->uid, 'day' => $user->day, 'month' => $month);
		}

Comments

maartenvg’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.