]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4823 returning ElggRelationship from check_entity_relationship() rather than...
authorCash Costello <cash.costello@gmail.com>
Sun, 10 Mar 2013 16:14:15 +0000 (12:14 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 10 Mar 2013 16:14:15 +0000 (12:14 -0400)
engine/lib/relationships.php

index c1a7cc080974eb91fa4b9ec6c7112a286fdfb09b..fe0b8364d04af64f275f47f32b35e9b7bd6bf769 100644 (file)
@@ -109,7 +109,7 @@ function add_entity_relationship($guid_one, $relationship, $guid_two) {
  * @param string $relationship The type of relationship
  * @param int    $guid_two     The GUID of the entity the relationship is with
  *
- * @return object|false Depending on success
+ * @return ElggRelationship|false Depending on success
  */
 function check_entity_relationship($guid_one, $relationship, $guid_two) {
        global $CONFIG;
@@ -123,7 +123,7 @@ function check_entity_relationship($guid_one, $relationship, $guid_two) {
                        AND relationship='$relationship'
                        AND guid_two=$guid_two limit 1";
 
-       $row = get_data_row($query);
+       $row = row_to_elggrelationship(get_data_row($query));
        if ($row) {
                return $row;
        }