xmlrpc_value_calculate_type() fails for empty arrays
ax - October 15, 2005 - 23:25
| Project: | Drupal |
| Version: | x.y.z |
| Component: | base system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
patch for http://lists.drupal.org/archives/drupal-devel/2005-10/msg00386.html (in short: xmlrpc_value_calculate_type() wrongly returns 'struct' for empty arrays, which breaks blogapi-clients).
fix: return 'array' for empty arrays.
additionally:
* PHPDoc for xmlrpc_value_calculate_type()
* use is_*() instead of gettype() as advised in the PHP manual (and document this)
* coding style
please review and apply (to 4.5 and 4.6, too). thanks!
| Attachment | Size |
|---|---|
| xmlrpc_8.patch | 2.83 KB |

#1
To get rid of
gettypeand useemptyto check for empty arrays, that's good. But to get rid of that array key checker completely -- that's not. Because if I have anarray('foo', 'bar', 'this' => 'that')it's a struct.#2
ah - thats what your range() was good for. allright - put it back in then.
#3
shouldn't blogapi-clients work in 4.7 (bump)?
#4
#5
Committed to HEAD and DRUPAL-4-6. Thanks.
#6