From 7fb95f609a42da3964188b8093d0b66e439e33d0 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 22 Jan 2009 15:29:24 +0000 Subject: Closes #701: Blank tags not returned by string_to_tag_array git-svn-id: https://code.elgg.org/elgg/trunk@2597 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 356ecd003..5ee17c486 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1860,6 +1860,20 @@ return false; } + /** + * Function to be used in array_filter which returns true if $string is not null. + * + * @param string $string + * @return bool + */ + function is_not_null($string) + { + if (($string==='') || ($string===false) || ($string===null)) + return false; + + return true; + } + /** * Get the full URL of the current page. * -- cgit v1.2.3