From da83aa0dd9d4fcbb81a9c2f27cb43587f9225279 Mon Sep 17 00:00:00 2001 From: icewing Date: Sat, 29 Mar 2008 17:18:38 +0000 Subject: Marcus Povey * No such entity error thrown if invalid guid given for export git-svn-id: https://code.elgg.org/elgg/trunk@292 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/lib/export.php') diff --git a/engine/lib/export.php b/engine/lib/export.php index 5937a71bc..61cee79ba 100644 --- a/engine/lib/export.php +++ b/engine/lib/export.php @@ -46,7 +46,7 @@ $to_be_serialised = trigger_plugin_hook("export", "all", array("guid" => $guid), $to_be_serialised); // Sanity check - if (!is_array($to_be_serialised)) throw new ExportException("There was a problem during the serialisation of GUID:$guid"); + if ((!is_array($to_be_serialised)) || (count($to_be_serialised)==0)) throw new ExportException("No such entity GUID:$guid"); // Now serialise the result to XML $wrapper = new stdClass; -- cgit v1.2.3