aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/export/handler.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/services/export/handler.php b/services/export/handler.php
index f37921bef..2318e4ea8 100644
--- a/services/export/handler.php
+++ b/services/export/handler.php
@@ -30,7 +30,12 @@
($id_or_name=="")
)
{
- page_draw("GUID:$guid", elgg_view("export/entity", array("entity" => get_entity($guid), "uuid" => guid_to_uuid($guid))));
+ $entity = get_entity($guid);
+
+ if (!$entity)
+ throw new InvalidParameterException(sprintf(elgg_echo('InvalidParameterException:GUIDNotFound'), $guid));
+
+ page_draw("GUID:$guid", elgg_view("export/entity", array("entity" => $entity, "uuid" => guid_to_uuid($guid))));
}
// Export an individual attribute
@@ -42,6 +47,9 @@
{
// Get a uuid
$entity = get_entity($guid);
+ if (!$entity)
+ throw new InvalidParameterException(sprintf(elgg_echo('InvalidParameterException:GUIDNotFound'), $guid));
+
$uuid = guid_to_uuid($entity->getGUID()) . "$type/$id_or_name/";
switch ($type)