ZF-6280: Wrong return type for Zend_Dom_Query_Css2XPath::transform()
Description
The docblock for Zend_Dom_Query_Css2XPath::transform() indicates that the only return type should be a string. However, when multiple expressions are specified, it is possible for it to return an array. It appears from its test suite that this is expected behavior. See the test suite method testTransformShouldReturnMultiplePathsWhenExpressionContainsCommas(). The docblock should be corrected to reflect this.
Comments
Posted by Matthew Turland (elazar) on 2009-04-12T21:11:01.000+0000
Patch to correct the docblock issue.
Posted by Matthew Turland (elazar) on 2009-04-12T21:14:57.000+0000
Zend_Dom_Query::query() passes the return value of Zend_Dom_Query_Css2XPath::transform() as the first parameter ($xpathQuery) to Zend_Dom_Query::queryXPath(). The docblock for Zend_Dom_Query::queryXPath() indicates that $xpathQuery may only be a string, but can obviously also be an array.
Posted by Matthew Turland (elazar) on 2009-04-12T21:16:16.000+0000
Updated patch to include fix for Zend_Dom_Query::queryXPath().
Posted by Satoru Yoshida (satoruyoshida) on 2009-07-29T19:35:02.000+0000
Solve in SVN r17292