From 15851b98227ebf9671f8f7facd11426a72da6ea6 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 21 May 2014 11:16:33 +0200 Subject: getNS returns empty string instead of false --- inc/pageutils.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index 8474c5697..b678aa7c3 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -146,19 +146,25 @@ function cleanID($raw_id,$ascii=false){ * Return namespacepart of a wiki ID * * @author Andreas Gohr + * + * @param string $id + * @return string */ function getNS($id){ $pos = strrpos((string)$id,':'); if($pos!==false){ return substr((string)$id,0,$pos); } - return false; + return ''; } /** * Returns the ID without the namespace * * @author Andreas Gohr + * + * @param string $id + * @return string */ function noNS($id) { $pos = strrpos($id, ':'); -- cgit v1.2.3