PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Text » Text_Wiki » Bug #4175

Wrong transform method

Details

Submitted2005-04-18 12:06 UTC
Fromphilippe at daucourt dot org
Assignedpmjones
StatusClosed
PackageText_Wiki
PHP Version4.3.8
OSSuse Linux 9.2
Roadmaps(Not assigned)

Comments

[2005-04-18 12:06 UTC] philippe at daucourt dot org

Description:
------------
If you use a wrong transform method (like HTML instead of xhtml) you get this strange error message.

Reproduce code:
---------------
<?php
require_once 'Text/Wiki.php';

$wiki = &new Text_Wiki();
$wiki->disableRule('wikilink');

$html = $wiki->transform($_POST[text], 'HTML');

echo $html;
?>

Expected result:
----------------
It would be better to write something like this:

Fatal error: HTML is not a supported transform method

Actual result:
--------------
Fatal error: Call to a member function on a non-object in /usr/share/php/Text/Wiki.php on line 909