diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 22:01:20 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-05 22:01:20 +0000 |
commit | 6d2af55dde922ac10a288b4195b1bf338e7bc5a9 (patch) | |
tree | f0bb51ad44608872afa3a9ab26acbff3629c9d90 | |
parent | 0e80bb5e347ff00c6f81627d8e39dafaaa923bc5 (diff) | |
download | rpg-6d2af55dde922ac10a288b4195b1bf338e7bc5a9.tar.gz rpg-6d2af55dde922ac10a288b4195b1bf338e7bc5a9.tar.bz2 |
suppress errors where list() may not fill all vars
-rw-r--r-- | inc/common.php | 6 | ||||
-rw-r--r-- | inc/parser/metadata.php | 2 | ||||
-rw-r--r-- | inc/parser/renderer.php | 6 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/inc/common.php b/inc/common.php index 36bd32c4f..6aad42bd1 100644 --- a/inc/common.php +++ b/inc/common.php @@ -773,7 +773,7 @@ function checklock($id) { } //my own lock - list($ip, $session) = explode("\n", io_readFile($lock)); + @list($ip, $session) = explode("\n", io_readFile($lock)); if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { return false; } @@ -811,7 +811,7 @@ function lock($id) { function unlock($id) { $lock = wikiLockFN($id); if(@file_exists($lock)) { - list($ip, $session) = explode("\n", io_readFile($lock)); + @list($ip, $session) = explode("\n", io_readFile($lock)); if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { @unlink($lock); return true; @@ -1536,7 +1536,7 @@ function send_redirect($url) { // work around IE bug // http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/ - list($url, $hash) = explode('#', $url); + @list($url, $hash) = explode('#', $url); if($hash) { if(strpos($url, '?')) { $url = $url.'&#'.$hash; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 73bae190f..82a268fd6 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -299,7 +299,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { // first resolve and clean up the $id resolve_pageid(getNS($ID), $id, $exists); - list($page, $hash) = explode('#', $id, 2); + @list($page, $hash) = explode('#', $id, 2); // set metadata $this->meta['relation']['references'][$page] = $exists; diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 1f9ad00a2..e748c36d8 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -274,8 +274,8 @@ class Doku_Renderer extends DokuWiki_Plugin { function _simpleTitle($name){ global $conf; - //if there is a hash we use the ancor name only - list($name,$hash) = explode('#',$name,2); + //if there is a hash we use the anchor name only + @list($name,$hash) = explode('#',$name,2); if($hash) return $hash; if($conf['useslash']){ @@ -301,7 +301,7 @@ class Doku_Renderer extends DokuWiki_Plugin { } //split into hash and url part - list($reference,$hash) = explode('#',$reference,2); + @list($reference,$hash) = explode('#',$reference,2); //replace placeholder if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#',$url)){ diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 184e62fe3..4966f103a 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -606,7 +606,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } //keep hash anchor - list($id,$hash) = explode('#',$id,2); + @list($id,$hash) = explode('#',$id,2); if(!empty($hash)) $hash = $this->_headerToLink($hash); //prepare for formating |