Home » Text » Text_Wiki » Bug #1722
Impossible To Use Two Text_Wiki Instances At The Same Time
Details
| Submitted | 2004-06-25 21:13 UTC |
|---|---|
| From | purestorm at ggnore dot net |
| Assigned | pmjones |
| Status | Closed |
| Package | Text_Wiki |
| PHP Version | 4.3.6 |
| Roadmaps | (Not assigned) |
Comments
[2004-06-25 21:13 UTC] purestorm at ggnore dot net
Description:
------------
It seems that the code below does not work correctly. I
use the most current alpha version of Text_Wiki.
I have a similar problem inside a system with very many
objects (a typical binarycloud page: http://
wiki.binarycloud.com for more information) where a
freshly created class instance becomes null and a call
to a method of this object results in fatal error (call
to method of non object).
So I think this is not a problem inside the Render/*
code (as the package maintainer suggested) because
everything in there seems fine and simple. Instead, I
think there is a problem with the many objects created
and PHP handling them.
Reproduce code:
---------------
<?php
include_once('/usr/lib/php/Text/Wiki.php');
$parser =& new Text_Wiki();
$text = '+ Header Level 1';
echo $parser->transform($text, 'xhtml');
$parser =& new Text_Wiki();
$text = '+ Header Level 1';
echo $parser->transform($text, 'xhtml');
?>
Expected result:
----------------
The output should be:
<h1>Header Level</h1>
<h1>Header Level</h1>
Actual result:
--------------
<h1>Header Level 1</h1>
+ Header Level 1