Re: pear-bugs Digest 18 May 2012 05:47:25 -0000 Issue 547
| From: | Jimgreen8 | Date: | Mon, 21 May 2012 10:05:35 +0000 |
| Subject: | Re: pear-bugs Digest 18 May 2012 05:47:25 -0000 Issue 547 | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8675@lists.php.net to get a copy of this message | ||
Sent from my iPhone
On May 18, 2012, at 13:47, pear-bugs-digest-help@lists.php.net wrote:
>
> pear-bugs Digest 18 May 2012 05:47:25 -0000 Issue 547
>
> Topics (messages 8669 through 8670):
>
> [PEAR-BUG] Req #19403 [Opn->Csd]: getValue() returns wrong technical field
> 8669 by: borz_off.cs.msu.su
>
> [PEAR-BUG] Bug #19421 [Opn->Csd]: phpcs doesn't recognize ${x} as equivalent to $x
> 8670 by: gsherwood.squiz.net
>
> Administrivia:
>
> To subscribe to the digest, e-mail:
> <pear-bugs-digest-subscribe@lists.php.net>
>
> To unsubscribe from the digest, e-mail:
> <pear-bugs-digest-unsubscribe@lists.php.net>
>
> To post to the list, e-mail:
> <pear-bugs@lists.php.net>
>
>
> ----------------------------------------------------------------------
> Edit report at g#;/ÔK9P©n -
> –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
>
> Edit report at
> https://pear.php.net/bugs/bug.php?id=19421&edit=1
>
> ID: 19421
> Updated by: gsherwood@squiz.net
> Reported By: andy at petdance dot com
> Summary: phpcs doesn't recognize ${x} as equivalent to $x
> -Status: Open
> +Status: Closed
> Type: Bug
> Package: PHP_CodeSniffer
> Package Version: 1.3.3
> PHP Version: 5.3.13
> -Assigned To:
> +Assigned To: squiz
> Roadmap Versions:
> New Comment:
>
> -Status: Open
> +Status: Closed
> -Assigned To:
> +Assigned To: squiz
> Fixed in github repo:
>
> https://github.com/squizlabs/PHP_CodeSniffer/commit/c79233f37925872d1f1a9b08a
> 2cf091a72794d66
>
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2012-05-16 16:44:39] petdance
>
> Description:
> ------------
> ${x} is valid as an expression of $x. It's often used in interpolation,
> but is valid outside of strings as well.
>
> Test script:
> ---------------
> <?php
>
> // Variable $x can be expressed as ${x} but phpcs doesn't detect that.
>
> function foo( $bar ) {
> print "${bar} things\n";
> }
>
> function bar( $x ) {
> return 2 * ${x};
> }
>
> print 'Should say "14 things"' . "\n";
> $fourteen = bar( 7 );
> foo( $fourteen );
>
> ?>
>
>
> Expected result:
> ----------------
> When I run phpcs against that, there should be no errors.
>
> Actual result:
> --------------
> FILE: /home/alester/scraps/sniffbugs.php
> --------------------------------------------------------------------------------
> FOUND 1 ERROR(S) AND 2 WARNING(S) AFFECTING 3 LINE(S)
> --------------------------------------------------------------------------------
> 5 | WARNING | The method parameter $bar is never used
> 9 | WARNING | The method parameter $x is never used
> 10 | ERROR | Constants must be uppercase; expected X but found x
> --------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
>
> --
> Edit this bug report at
> https://pear.php.net/bugs/bug.php?id=19421&edit=1
>