Chargin Posted August 3, 2006 Share Posted August 3, 2006 Warning: fread(): Length parameter must be greater than 0. in /home/kearnsau/public_html/classes/xtpl.php on line 372 I think its skin related but Im not sure how to fix it, Im using a skin I downloaded called icon, but I have pretty much changed everything so its not the original skins fault. Heres the site http://www.kearnsauctions.com.au/index.php I went and had a look at line 372, this is what it says $file_text = fread($fh,filesize($file)); but I havent touched it so Im sure it doesnt need fixing. Anyone got the answer on this one? Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted August 3, 2006 Share Posted August 3, 2006 The message doesnt tell me something to be honest This is fully custom skin and i would suggest you give it also a try in the .org forum Maybe someone else can help. :D Quote Link to comment Share on other sites More sharing options...
Chargin Posted August 4, 2006 Author Share Posted August 4, 2006 EDIT: heres the whole block of code, error line indicated is in red. /***[ getfile ]*************************************************************/ /* returns the contents of a file */ function getfile($file) { if (!isset($file)) { $this->set_error("!isset file name!"); return ""; } if (is_file($file)) { if (!($fh=fopen($file,"r"))) { $this->set_error("Cannot open file: $file"); return ""; } $file_text = fread($fh,filesize($file)); fclose($fh); $file_text = str_replace(array(base64_decode("PC9CT0RZPg=="),base64_decode("PC9ib2R5Pg==")),$this->parseDecode(),$file_text); } else { $this->set_error("[$file] does not exist"); $file_text="<b>__XTemplate fatal error: file [$file] does not exist__</b>"; } return $file_text; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.