ZF-8835: Zend_Validate_Isbn uses incomplete and deprecated regular expression
Description
The component uses ereg in {{_detectFormat}}
Ereg is deprecated as of PHP 5.3: http://nl.php.net/ereg
Also, the regular expression is not doing what it's supposed to do when using anything other than a blank separator. I think the underlined code below is supposed to check the total length of the string is equal to 17, but this does not work. See patch for a possible usage of preg_match instead of ereg and checking the string length separately, see attached patch.
^^^^
Comments
Posted by Menno Luiten (mluiten) on 2010-01-16T03:39:05.000+0000
Attached patch
Posted by Thomas Weidner (thomas) on 2010-01-16T05:28:57.000+0000
Fixed with r20335
Thanks for your patch... solved it slightly differently