Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.8
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Dom_Query
-
Labels:None
Description
Zend_Dom_Query::query() calls Zend_Dom_Query_Css2XPath::transform(), which can return an array. It passes this as $xpathQuery to Zend_Dom_Query::queryXPath(), which passes it to Zend_Dom_Query::_getNodeList(). According to the docblock for this method, $xpathQuery may be a string or an array. However, this method explicitly casts $xpathQuery to a string, which results in that variable being equal to the string "Array" if the original value for $xpathQuery is an array.
In my opinion, it would be best for the sake of consistency to restrict $xpathQuery to be a string for both queryXPath() and _getNodeList() and to modify Zend_Dom_Query_Css2XPath::transform() so that it only ever returns a string.
Issue Links
| This issue is related to: | ||||
| ZF-6280 | Wrong return type for Zend_Dom_Query_Css2XPath::transform() |
|
|
|
Is it still alive after
ZF-6280fix?ZF-6280fix?