Issues

ZF-9601: Zend_Validate_Barcode make call of the method Zend_Validate_Abstract:>_setValue($value)

Issue Type: Improvement Created: 2010-04-02T17:34:19.000+0000 Last Updated: 2010-04-03T03:38:20.000+0000 Status: Resolved Fix version(s): - 1.10.4 (28/Apr/10)

Reporter: Ramon Henrique Ornelas (ramon) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:

Description

current code line 192 in file, Zend/Validate/Barcode.php

<pre class="highlight">
$this->_value = (string) $value;

Change to

<pre class="highlight">
$this->_setValue($value);

Comments

Posted by Thomas Weidner (thomas) on 2010-04-02T23:59:03.000+0000

What's the benefit/improvement of deleting (string)? Could be a problem in my eyes when the given value is no string.

Posted by Thomas Weidner (thomas) on 2010-04-03T03:30:42.000+0000

Changed with r21748

Posted by Ramon Henrique Ornelas (ramon) on 2010-04-03T03:35:06.000+0000

@Thomas I agree it would be a problem, but before of the assignment is made a validate of the type of given passed.

line 187 the 190 in, Zend/Validate/Barcode.php

<pre class="highlight">
if (!is_string($value)) {
    $this->_error(self::INVALID);
    return false;
}

Posted by Ramon Henrique Ornelas (ramon) on 2010-04-03T03:38:20.000+0000

@Thomas Thanks, Disregard my comment above.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts