php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2013 Infinite loop where it shouldnt be
Submitted: 1999-08-09 17:49 UTC Modified: 1999-12-16 23:36 UTC
From: sander at pilon dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 OS: Linux 2.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sander at pilon dot com
New email:
PHP Version: OS:

 

 [1999-08-09 17:49 UTC] sander at pilon dot com
Zeev knows about this.... this program loops, and it shouldnt as far as I can see:

<script language="php">
	/*
	 * 	Prints a bar-quoted line. 
	 */
	function 	bord_barquotes_printplain($line,$level,$first=true)
	{
		$len = strlen($line);
		$idx = $len-1;
		if( $line[$idx] != "\n" ) echo "\n";
		return $line;
	}		
	
	/* 
	 *  Renders a complete article, with barquotes.
	 */
	function	bord_renderarticle_quotebars($group,$mid,$func="bord_barquotes_print",$quote=0)
	{		
		$newbody[] = "PHP4 BETA2 TEST";
			
		echo "BEFORE LOOP: ".count($newbody)."<BR>";
		for($i=0;$i<=count($newbody);$i++)
		{
			echo "DURING LOOP: ".count($newbody)."<BR>";
			flush();		// flush doesnt affect it.
			echo $func($newbody[$i],$newlvl[$i]+$quote);
		}
	}

	bord_renderarticle_quotebars($gid,$mid,"bord_barquotes_printplain");	
</script>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-01 10:27 UTC] thies at cvs dot php dot net
doesn't loop with CVS version any more;-)
 [1999-12-16 23:36 UTC] evan at cvs dot php dot net
This has been fixed in the latest PHP4 CVS. Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC