From d0980545ba6cd44de6caaacdf32138e79a4a2160 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 16 Feb 2009 15:39:44 +0000 Subject: Short circuit get entity on impossible values, saving two db queries per page git-svn-id: https://code.elgg.org/elgg/trunk@2767 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index a85596d8a..ebb176feb 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1386,6 +1386,8 @@ { global $CONFIG; + if (!$guid) return false; + $guid = (int) $guid; $row = retrieve_cached_entity_row($guid); -- cgit v1.2.3