Req #19403 [Opn->Csd]: getValue() returns wrong technical field
| From: | borz_off at cs dot msu dot su | Date: | Tue, 15 May 2012 16:09:22 +0000 |
| Subject: | Req #19403 [Opn->Csd]: getValue() returns wrong technical field | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8669@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19403&edit=1
ID: 19403
Updated by: borz_off@cs.msu.su
Reported By: loki_angel at mail dot ru
Summary: getValue() returns wrong technical field
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: HTML_QuickForm2
Package Version: 2.0.0beta2
PHP Version: 5.4.1
-Assigned To:
+Assigned To: avb
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: avb
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
--
Implemented this as a filter on QuickForm2 object, thus getRawValue()
still returns internal fields but getValue() does not.
Previous Comments:
------------------------------------------------------------------------
[2012-05-02 08:33:43] avb
-Type: Bug
+Type: Feature/Change Request
It is a feature request rather than a bug report, we didn't promise to
strip these fields. We do similar stuff in Controller::getValue(),
though, so will probably add a means to strip these in
QuickForm2::getValue(), too.
------------------------------------------------------------------------
[2012-04-28 12:03:47] loki
Description:
------------
getValue() returns wrong technical field
Test script:
---------------
<?php
require_once 'HTML/QuickForm2.php';
require_once 'HTML/QuickForm2/Renderer.php';
$form = new HTML_QuickForm2('elements');
$form->addElement('hidden', 'test', null);
$form->addElement('submit');
$renderer = HTML_QuickForm2_Renderer::factory('default');
$form->render($renderer);
var_dump($form->getValue());
echo $renderer;
Expected result:
----------------
array
'test' => string '' (length=0)
Actual result:
--------------
array
'_qf__elements' => string '' (length=0)
'test' => string '' (length=0)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19403&edit=1