From 03c4aec3c817c51eda2cf5c241f76e3bef585799 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 4 Aug 2006 16:22:43 +0200 Subject: unittest fixes darcs-hash:20060804142243-9b6ab-d208f7f1a67a9958fda05c519c8407ad5e733cea.gz --- inc/pageutils.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index a478ecd3a..aacee1b13 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -21,7 +21,7 @@ function getID($param='id',$clean=true){ global $conf; - $id = $_REQUEST[$param]; + $id = isset($_REQUEST[$param]) ? $_REQUEST[$param] : null; //construct page id from request URI if(empty($id) && $conf['userewrite'] == 2){ @@ -301,7 +301,11 @@ function resolve_pageid($ns,&$page,&$exists){ $exists = false; //keep hashlink if exists then clean both parts - list($page,$hash) = split('#',$page,2); + if (strpos($page,'#')) { + list($page,$hash) = split('#',$page,2); + } else { + $hash = ''; + } $hash = cleanID($hash); $page = resolve_id($ns,$page,false); // resolve but don't clean, yet -- cgit v1.2.3