Issues

ZF-10678: Barcode Code39 trim

Issue Type: Patch Created: 2010-11-12T13:38:21.000+0000 Last Updated: 2013-02-01T14:36:23.000+0000 Status: Resolved Fix version(s): - 1.11.1 (30/Nov/10)

Reporter: Hermem Sp. z o.o. (hermem) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Barcode

Related issues: Attachments:

Description

Zend_Barcode_Object_ObjectAbstract contains:

<pre class="highlight">
.   /**
     * Set text to encode
     * @param string $value
     * @return Zend_Barcode_Object
     */
    public function setText($value)
    {
        $this->_text = trim($value);
        return $this;
    }

But in barcode Code39 standard there is ' '(space) char available. Problem appears when space is at the and of barcode text. In this function trim remove this char.

Solution:

Override setText in Zend_Barcode_Object_Code39 by removing trim:

<pre class="highlight">
.   /**
     * Set text to encode
     * @param string $value
     * @return Zend_Barcode_Object
     */
    public function setText($value)
    {
        $this->_text = $value;
        return $this;
    }

Comments

Posted by Mickael Perraud (mikaelkael) on 2010-11-14T06:03:55.000+0000

Add code tag

Posted by Hermem Sp. z o.o. (hermem) on 2010-11-14T06:40:39.000+0000

OK, i will add :)

Posted by Mickael Perraud (mikaelkael) on 2010-11-19T08:53:17.000+0000

Fixed with r23397 for Code39 and Code128

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