Bug #18350 Updated: PHP script executed twice

From: Date: Mon, 15 Jul 2002 13:07:34 +0000
Subject: Bug #18350 Updated: PHP script executed twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14203@lists.php.net to get a copy of this message
ID: 18350 Updated by: jobartim@voila.fr Reported By: jobartim@voila.fr Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.2.1 New Comment: I just forget to say what is exactly the bug : the script executes twice so it deletes 2 lines when I want only one to be deleted ... Previous Comments: ------------------------------------------------------------------------ [2002-07-15 09:01:56] jobartim@voila.fr Here is the script which gives problems, this script delete the lines number $i where $tab[$i] == "on" $fp = fopen($file,"r"); $fp2 = fopen("$file.tmp","w"); $i = 0; while($line = fgets($fp,4096)) { if ($tab[$i] != "on") fwrite($fp2,$line); $i++; } fclose($fp2); fclose($fp); rename("$file.tmp",$file); This script is called by a post form. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18350&edit=1

« previous php.bugs (#14203) next »