about summary refs log tree commit diff
path: root/sourcecodes/remove_variables_processing_default.php
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/remove_variables_processing_default.php')
-rw-r--r--sourcecodes/remove_variables_processing_default.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/sourcecodes/remove_variables_processing_default.php b/sourcecodes/remove_variables_processing_default.php
index 3c5ffb68..102fffea 100644
--- a/sourcecodes/remove_variables_processing_default.php
+++ b/sourcecodes/remove_variables_processing_default.php
@@ -11,8 +11,10 @@ $dir="/tmp/bnw/";
 $tf=$dir.$keyval."del_var.txt";
 $fpvar = fopen("$tf","w");
 
-fwrite($fpvar,"$tier");
-fclose($fpvar);
+if ($fpvar !== false) {
+  fwrite($fpvar,"$tier");
+  fclose($fpvar);
+}
 }
 
 
@@ -28,9 +30,11 @@ function enter_ban_list($t1,$s1,$t2,$s2,$tier_d,$fpvar)
             $data_val_2=$tier_d[$t2][$j];
             if($data_val_1!=$data_val_2)
             {
-               
-               fprintf($fpvar,"%s\t%s\n",$data_val_1,$data_val_2); 
-              
+
+               if ($fpvar !== false) {
+                 fprintf($fpvar,"%s\t%s\n",$data_val_1,$data_val_2);
+               }
+
 
             }
    
@@ -152,7 +156,9 @@ for ($i=0;$i<$n;$i+=2)
 
 	if($d1!="" && $d2!="")
 	{
-  		fprintf($fpvar,"%s\t%s\n",$d1,$d2);
+  		if ($fpvar !== false) {
+  		  fprintf($fpvar,"%s\t%s\n",$d1,$d2);
+  		}
   		$nn++;
 	}
 
@@ -178,7 +184,9 @@ $d2=trim($data[$ii]);
 
 if($d1!="" && $d2!="")
 {
-  fprintf($fpvar,"%s\t%s\n",$d1,$d2);
+  if ($fpvar !== false) {
+    fprintf($fpvar,"%s\t%s\n",$d1,$d2);
+  }
   $nn++;
 }