Browse Source

! $context['my_likes'] wasn't always an array (per #890)

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>
Michael Eshom 11 years ago
parent
commit
cafc28ac13
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Sources/Display.php

+ 2 - 1
Sources/Display.php

@@ -1862,9 +1862,10 @@ function prepareLikesContext()
 	$cache_key = 'likes_topic_' . $topic . '_' . $context['user']['id'];
 	$ttl = 180;
 
+	$temp = array();
+
 	if ($temp = cache_get_data($cache_key, $ttl) === null)
 	{
-		$temp = array();
 		$request = $smcFunc['db_query']('', '
 			SELECT content_id
 			FROM {db_prefix}user_likes AS l