about summary refs log tree commit diff
path: root/sourcecodes/mat_structure.php
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/mat_structure.php')
-rw-r--r--sourcecodes/mat_structure.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/sourcecodes/mat_structure.php b/sourcecodes/mat_structure.php
index 29bdb854..f4e80290 100644
--- a/sourcecodes/mat_structure.php
+++ b/sourcecodes/mat_structure.php
@@ -48,6 +48,7 @@ $i++;
 
 
 $j=0;
+if ($fp !== false) {
 for($l=0;$l<=$i;$l++)
 {
   $line=$arrname[$l];
@@ -55,23 +56,24 @@ for($l=0;$l<=$i;$l++)
   if($j==0)
   {
     fwrite($fp,$line);
-    
+
   }
   else
-  {  
-   
+  {
+
     $data_cell=explode("\t",$line);
-  
+
     for($k=0;$k<$i;$k++)
     {
        $cell=$data_cell[$k]*$cell_val[$k];
        fprintf($fp,"%s\t",$cell);
-    } 
+    }
   }
   fprintf($fp,"\n");
- 
+
   $j++;
 }
+}
 
 //return $matfilestruct;
 }