aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-18 18:02:39 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:44:00 -0500
commit6d7e1da630e2a6937ba1afaed69d05f27ed003b9 (patch)
tree1b98f6085c8339f0fa81e05e1257e0ba71e0d00a /engine
parentb230c428e322d7845408dc023adf6e2257764bd7 (diff)
downloadelgg-6d7e1da630e2a6937ba1afaed69d05f27ed003b9.tar.gz
elgg-6d7e1da630e2a6937ba1afaed69d05f27ed003b9.tar.bz2
Fixes #4131 elgg_delete_metastring_based_object_by_id() should return a bool
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/metastrings.php2
-rw-r--r--engine/tests/api/metastrings.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index 9dccec700..9fe9b4bff 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -810,7 +810,7 @@ function elgg_delete_metastring_based_object_by_id($id, $type) {
}
if (($obj->canEdit()) && (elgg_trigger_event('delete', $type, $obj))) {
- return delete_data("DELETE from $table where id=$id");
+ return (bool)delete_data("DELETE from $table where id=$id");
}
}
diff --git a/engine/tests/api/metastrings.php b/engine/tests/api/metastrings.php
index 0a008c6ce..f6870d34b 100644
--- a/engine/tests/api/metastrings.php
+++ b/engine/tests/api/metastrings.php
@@ -80,7 +80,7 @@ class ElggCoreMetastringsTest extends ElggCoreUnitTest {
$test = get_data($q);
$this->assertEqual($test[0]->id, $id);
- $this->assertTrue(elgg_delete_metastring_based_object_by_id($id, $type));
+ $this->assertIdentical(true, elgg_delete_metastring_based_object_by_id($id, $type));
$this->assertFalse(get_data($q));
}
}