Zend Framework

Zend_Validate_GreaterThan does not accept $options in array() anymore

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Validate
  • Labels:
    None

Description

Zend_Form::addElement is giving it's validators options in a form of array(). But Zend_Validate_GreaterThan does not process array() given as parameter to constructor. It honors Zend_Config instance now only.

Issue Links

Activity

Hide
Tomasz Sterna added a comment -

Here's a patch that fixes the problem.

Show
Tomasz Sterna added a comment - Here's a patch that fixes the problem.
Hide
Thomas Weidner added a comment -

Please give some reproducable informations...

Which release are you refering to?
How did you initialise the validator?

Show
Thomas Weidner added a comment - Please give some reproducable informations... Which release are you refering to? How did you initialise the validator?
Hide
Thomas Weidner added a comment -

Seems to duplicate ZF-7153

Show
Thomas Weidner added a comment - Seems to duplicate ZF-7153
Hide
Tomasz Sterna added a comment -

Being unable to reproduce didn't stop you from merging my fix to Zend_Validate_GreaterThan and other Validators in SVN r20182.

You have really bizarre development practices in Zend Framework making me doubt the framework credibility.

$ svn log -c20182 library/Zend/
------------------------------------------------------------------------
r20182 | thomas | 2010-01-10 22:12:01 +0100 (nie) | 3 linie

ZF-7153 Zend_Validate:

  • added missing classes
    ------------------------------------------------------------------------

$ svn diff -c20182 library/Zend/Validate/GreaterThan.php
Index: library/Zend/Validate/GreaterThan.php
===================================================================
— library/Zend/Validate/GreaterThan.php (wersja 20181)
+++ library/Zend/Validate/GreaterThan.php (wersja 20182)
@@ -66,6 +66,9 @@
{
if ($min instanceof Zend_Config) { $min = $min->toArray(); + }
+
+ if (is_array($min)) {
if (array_key_exists('min', $min)) { $min = $min['min']; } else {

Show
Tomasz Sterna added a comment - Being unable to reproduce didn't stop you from merging my fix to Zend_Validate_GreaterThan and other Validators in SVN r20182. You have really bizarre development practices in Zend Framework making me doubt the framework credibility. $ svn log -c20182 library/Zend/ ------------------------------------------------------------------------ r20182 | thomas | 2010-01-10 22:12:01 +0100 (nie) | 3 linie ZF-7153 Zend_Validate:
  • added missing classes ------------------------------------------------------------------------
$ svn diff -c20182 library/Zend/Validate/GreaterThan.php Index: library/Zend/Validate/GreaterThan.php =================================================================== — library/Zend/Validate/GreaterThan.php (wersja 20181) +++ library/Zend/Validate/GreaterThan.php (wersja 20182) @@ -66,6 +66,9 @@ { if ($min instanceof Zend_Config) { $min = $min->toArray(); + } + + if (is_array($min)) { if (array_key_exists('min', $min)) { $min = $min['min']; } else {
Hide
Thomas Weidner added a comment -

Fixed with r20182

Note:
This issue was NOT CLOSED as unreproducable. It was linked to an older issue which was not fixed.

You may also note that this revision targeted much more things which you did not mention in this issue.

I'm sorry that you have problems with me fixing issues that fast. Normally users appreciate such a fast response.

Show
Thomas Weidner added a comment - Fixed with r20182 Note: This issue was NOT CLOSED as unreproducable. It was linked to an older issue which was not fixed. You may also note that this revision targeted much more things which you did not mention in this issue. I'm sorry that you have problems with me fixing issues that fast. Normally users appreciate such a fast response.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: