diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/common.php | 2 | ||||
-rw-r--r-- | inc/pageutils.php | 12 | ||||
-rw-r--r-- | inc/parserutils.php | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/inc/common.php b/inc/common.php index ebacca92e..7aaf8098b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -223,7 +223,7 @@ function buildURLparams($params, $sep='&'){ if($amp) $url .= $sep; $url .= $key.'='; - $url .= rawurlencode($val); + $url .= rawurlencode((string)$val); $amp = true; } return $url; 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 <andi@splitbrain.org> */ 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; } diff --git a/inc/parserutils.php b/inc/parserutils.php index 9f8b88cb6..95d9647ff 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -359,7 +359,7 @@ function p_purge_metadata($id) { function p_read_metadata($id,$cache=false) { global $cache_metadata; - if (isset($cache_metadata[$id])) return $cache_metadata[$id]; + if (isset($cache_metadata[(string)$id])) return $cache_metadata[(string)$id]; $file = metaFN($id, '.meta'); $meta = @file_exists($file) ? unserialize(io_readFile($file, false)) : array('current'=>array(),'persistent'=>array()); @@ -385,7 +385,7 @@ function p_read_metadata($id,$cache=false) { } if ($cache) { - $cache_metadata[$id] = $meta; + $cache_metadata[(string)$id] = $meta; } return $meta; |