How to resolve warning?

  • remdesign
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
11 years 6 months ago #30543 by remdesign
I installed the latest version of sparky-0.98f, but Layout Builder shows next warnings:

Warning: fopen(): Filename cannot be empty in /home/u553815702/public_html/templates/sparky_framework/elements/tadmin.php on line 74 Warning: fread() expects parameter 1 to be resource, boolean given in /home/u553815702/public_html/templates/sparky_framework/elements/tadmin.php on line 75 Warning: fclose() expects parameter 1 to be resource, boolean given in /home/u553815702/public_html/templates/sparky_framework/elements/tadmin.php on line 76

How much is it important?
How to resolve this warning?
Thanks.

Please Log in to join the conversation.

More
11 years 6 months ago #30549 by ivan.milic
Replied by ivan.milic on topic How to resolve warning?
Open tadmin.php and go to line 75, you will see code like this:
Code:
for( $loop = 0 ; $loop < count($help_files); $loop ++) { $hlpName = basename(basename($help_files[$loop],'.htm'),'.html'); $fh = fopen($help_files[$loop], 'r'); $hlpContent = fread($fh, filesize($help_files[$loop])); fclose($fh);

replace it with:
Code:
for( $loop = 0 ; $loop < count($help_files); $loop ++) { $hlpName = basename(basename($help_files[$loop],'.htm'),'.html'); if(!file_exists ($help_files[$loop])) continue; $fh = fopen($help_files[$loop], 'r'); $hlpContent = fread($fh, filesize($help_files[$loop])); fclose($fh);

Please Log in to join the conversation.

Time to create page: 0.151 seconds
Powered by Kunena Forum