Skip to content

Commit 6b3f338

Browse files
author
Johannes Wehner
committedApr 22, 2011
Fixet php-warning, når man bruger 'disambiguate'.
1 parent 7d35c4a commit 6b3f338

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎textminer/Disambiguator.class.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ public function getRelatedTags($tag) {
5353
$sql = sprintf("SELECT l.tid, l.name, GROUP_CONCAT(r.rtid SEPARATOR ', ') AS rtids FROM lookup AS l LEFT JOIN relations AS r ON l.tid = r.tid WHERE l.vid IN (%s) AND l.name = '%s' GROUP BY l.tid", $vocabularies, $tag['navn']);
5454
$matches = array();
5555
$result = DatabaseBuddy::query($sql);
56-
while ($row = mysql_fetch_assoc($result)) {
57-
$matches[$row['tid']] = explode(',', $row['rtids']);
56+
if ($result) {
57+
while ($row = mysql_fetch_assoc($result)) {
58+
$matches[$row['tid']] = explode(',', $row['rtids']);
59+
}
5860
}
5961
return $matches;
6062
}

0 commit comments

Comments
 (0)
Please sign in to comment.