From 3a50618c0d0d03fe5cbf1d782868e84b873f2e89 Mon Sep 17 00:00:00 2001 From: gweissbach Date: Mon, 4 Aug 2008 13:24:44 +0200 Subject: Explicite TypeCast for searchIndex Running the /bin/indexer.php or the searchindex plugin fails in php5 with several type cast errors. This can be fixed using explicite type casts. Secondly the include plugin requires the auth.php to be present. As some other plugins might use quick-acl or the $auth too, indexer.php should require the auth.php just as the lib/exe/indexer.php does. darcs-hash:20080804112444-f4337-e12f25329236689b05e31f0db2119e47660a9404.gz --- inc/pageutils.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index c3d9a9ffc..50e76d44e 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -96,15 +96,15 @@ function cleanID($raw_id,$ascii=false){ $cache = & $cache_cleanid; // check if it's already in the memory cache - if (isset($cache[$raw_id])) { - return $cache[$raw_id]; + if (isset($cache[(string)$raw_id])) { + return $cache[(string)$raw_id]; } $sepchar = $conf['sepchar']; if($sepcharpat == null) // build string only once to save clock cycles $sepcharpat = '#\\'.$sepchar.'+#'; - $id = trim($raw_id); + $id = trim((string)$raw_id); $id = utf8_strtolower($id); //alternative namespace seperator @@ -129,7 +129,7 @@ function cleanID($raw_id,$ascii=false){ $id = trim($id,':._-'); $id = preg_replace('#:[:\._\-]+#',':',$id); - $cache[$raw_id] = $id; + $cache[(string)$raw_id] = $id; return($id); } @@ -139,9 +139,9 @@ function cleanID($raw_id,$ascii=false){ * @author Andreas Gohr */ function getNS($id){ - $pos = strrpos($id,':'); + $pos = strrpos((string)$id,':'); if($pos!==false){ - return substr($id,0,$pos); + return substr((string)$id,0,$pos); } return false; } -- cgit v1.2.3