ID:               24454
 User updated by:  mattias at segerdahl dot info
 Reported By:      mattias at segerdahl dot info
-Status:           Open
+Status:           Closed
 Bug Type:         Unknown/Other Function
 Operating System: Mandrake 9.1
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

Expected results and actual results should be switched.


Previous Comments:
------------------------------------------------------------------------

[2003-07-02 01:48:56] mattias at segerdahl dot info

Expected results and actual results should be switched.

------------------------------------------------------------------------

[2003-07-02 01:48:04] mattias at segerdahl dot info

Description:
------------
When running the following test, php dies on the 2nd loop preg_match()

Reproduce code:
---------------
==[test.php]===========================
<?php
  
  $fp = fopen("dirlist.template.php","r");
  
  while(!feof($fp))
  {
    echo 'start<br>' . "\n";
        echo
preg_replace("/\[!([^\]]+)!\]/e","\$this->tpl[\"\\1\"]",fgets($fp,1024));
    echo 'there<br>' . "\n";
  }
  
  fclose($fp);

  show_source("test2.php");
  show_source("dirlist.template.php");
?>
=======================================

==[dirlist.template.php]===============
<tr>
  <td width="20"><img src="templates/images/ico_[!FILETYPE!].gif"
width="16" height="16" alt="" border="0"></td>
  <td align="left"><a href="[!FILEURL!]">[!FILENAME!]</a></td>
  <td align="right">[!VERSIONS!]</td>
  <td align="right">[!DATETIME!]</td>
</tr>
=======================================


Expected result:
----------------
start
end
start

Actual result:
--------------
start
end
start
end
start
end
start
end
start
end
start
end


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24454&edit=1

Reply via email to