PEAR is archived and read-only

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

Home » HTML » HTML_QuickForm » Bug #5239

wrong input in setDefaults() causes QF not to display html element

Details

Submitted2005-08-30 07:28 UTC
Fromaxo at axolander dot de
StatusBogus
PackageHTML_QuickForm
PHP Version5.0.4
OSUNIX
Roadmaps(Not assigned)

Comments

[2005-08-30 07:28 UTC] axo at axolander dot de

Description:
------------
hi, this one is strange. if entering an array with any empty key to setDefaults(), html content isn't parsed any more.

surely, this is the wrong input to setDefaults(), but it should not break the whole output but an empty key should rather be ignored, i'd think.

Test script:
---------------
$f = new HTML_QuickForm();
$f -> setDefaults(array('' => ''));
$f -> addElement('html','testContent');
$chk = preg_match('#<form(.*)>(.*)<table(.*)>(.*)testContent(.*)</table>(.*)</form>#isU',$f -> toHtml());
var_dump($chk);

Expected result:
----------------
int(1)

Actual result:
--------------
int(0)