summaryrefslogtreecommitdiff
path: root/inc/io.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-11-18 20:48:56 +0100
committerAndreas Gohr <andi@splitbrain.org>2005-11-18 20:48:56 +0100
commite34c07094727f7ab777bc94b5b46df9c38bd6eee (patch)
treedac591411ce801f0fab97b0a6f726a12b00ade30 /inc/io.php
parentb7f6218b966a0c468ee59a80bcf383f99804ec3f (diff)
downloadrpg-e34c07094727f7ab777bc94b5b46df9c38bd6eee.tar.gz
rpg-e34c07094727f7ab777bc94b5b46df9c38bd6eee.tar.bz2
fixed a very rare problem with io_readfile and unserialize
darcs-hash:20051118194856-7ad00-5b7f8dea8371acd85ccfe31ac6f748cb2b619486.gz
Diffstat (limited to 'inc/io.php')
-rw-r--r--inc/io.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/io.php b/inc/io.php
index e1c4d1eb9..ff318bd67 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -36,7 +36,7 @@ function io_sweepNS($id){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function io_readFile($file){
+function io_readFile($file,$clean=true){
$ret = '';
if(@file_exists($file)){
if(substr($file,-3) == '.gz'){
@@ -45,7 +45,11 @@ function io_readFile($file){
$ret = join('',file($file));
}
}
- return cleanText($ret);
+ if($clean){
+ return cleanText($ret);
+ }else{
+ return $ret;
+ }
}
/**