diff options
author | chris <chris@jalakai.co.uk> | 2006-06-01 23:29:28 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-06-01 23:29:28 +0200 |
commit | 3b97c5ec44702052661770859b3f2c7a3d32b538 (patch) | |
tree | 5ba784a336f35bb390955ee31de5340fbbdffa0b | |
parent | 87858f840ff0ce65eca61a4716f4934f4e217f26 (diff) | |
download | rpg-3b97c5ec44702052661770859b3f2c7a3d32b538.tar.gz rpg-3b97c5ec44702052661770859b3f2c7a3d32b538.tar.bz2 |
fix php warning in common.php during getRevisions
A php warning can occur when the page name used in a revision check clashes with
a namespace (sub-directory) in the same directory. The strpos() call generates
the warning as the offset used is longer than the directory name.
darcs-hash:20060601212928-9b6ab-2d9399ba71fbfcae6e797977476e2f5daa50cf7f.gz
-rw-r--r-- | inc/common.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php index 1016c40d6..9638fb204 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1171,7 +1171,7 @@ function getRevisions($id){ if (is_dir($revd) && $dh = opendir($revd)) { while (($file = readdir($dh)) !== false) { if (substr($file, 0, $clid_len)===$clid) { - $p = strpos($file, '.', $clid_len+1); + $p = @strpos($file, '.', $clid_len+1); if (!$p===false) { $revs[] = substr($file, $clid_len+1, $p-$clid_len-1); } |