ZF-9302: Add missing break to Zend_Validate::is()
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.
Zend_Validate::is(123, 'Int', array(), array('My_Validate'));
// My/Validate/Int.php
// Zend/Validate/My/Validate/Int.php
Zend_Validate::is(123, 'Int', array(), array('My_Validate'));
// My/Validate/Int.php
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