ZF-8836: Zend_Validate_Barcode_AdapterAbstract uses call_user_func_array instead of call_user_func

Issue Type: Bug Created: 2010-01-16T03:55:05.000+0000 Last Updated: 2010-01-21T14:32:16.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Menno Luiten (mluiten) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


Which results in an invalid argument error (even when unit testing)

<pre class="highlight">
Index: library/Zend/Validate/Barcode/AdapterAbstract.php
--- library/Zend/Validate/Barcode/AdapterAbstract.php   (revision 20329)
+++ library/Zend/Validate/Barcode/AdapterAbstract.php   (working copy)
@@ -139,7 +139,7 @@
         $checksum = $this->getChecksum();
         if (!empty($checksum)) {
             if (method_exists($this, $checksum)) {
-                return call_user_func_array(array($this, $checksum), $value);
+                return call_user_func(array($this, $checksum), $value);


Posted by Thomas Weidner (thomas) on 2010-01-16T05:05:02.000+0000

There is no error running unittests Please give us reproducable informations

Posted by Menno Luiten (mluiten) on 2010-01-16T06:38:08.000+0000

Even if you're not getting errors, don't you agree it should change since the call_user_func_array expects an array as second argument, but a string is given in this case? So sooner or later (in this case: sooner), this will lead to errors or warnings.

Please see…. Apparently, PHP5.2 does not enforce it, but it will cause trouble if this code stays the same.

BTW: I am running php 5.3.0, in which it is enforced.

Posted by Thomas Weidner (thomas) on 2010-01-21T14:32:15.000+0000

Changed with r20509

PS: I still don't see a problem.. but I deleted the forcing of $value to array and the array-callback itself.

Have you found an issue?

See the Overview section for more details.


© 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.