Issues

ZF-9302: Add missing break to Zend_Validate::is()

Issue Type: Bug Created: 2010-03-01T20:00:27.000+0000 Last Updated: 2010-03-04T12:54:42.000+0000 Status: Resolved Fix version(s): - 1.10.3 (01/Apr/10)

Reporter: Jan Pieper (jpieper) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:

Description

I don't know whether this is a real bug but I think Zend_Validate::is() with own namespaces is working by a fluke.

<pre class="highlight">Zend_Validate::is(123, 'Int', array(), array('My_Validate'));

// My/Validate/Int.php
// Zend/Validate/My/Validate/Int.php


<pre class="highlight">Zend_Validate::is(123, 'Int', array(), array('My_Validate'));

// My/Validate/Int.php


<pre class="highlight">Index: library/Zend/Validate.php
===================================================================
--- library/Zend/Validate.php   (revision 21290)
+++ library/Zend/Validate.php   (working copy)
@@ -204,7 +204,7 @@
                     $file  = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
                     if (Zend_Loader::isReadable($file)) {
                         Zend_Loader::loadClass($class);
-                        $className = $class;
+                        $className = $class; break;
                     }
                 }
             }

This patch is not breaking any unit tests.

Comments

Posted by Thomas Weidner (thomas) on 2010-03-04T12:54:12.000+0000

Fixed with r21328

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