Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#2 | xmlrpc_9.patch | 2.87 KB | ax |
xmlrpc_8.patch | 2.83 KB | ax | |
Comments
Comment #1
chx CreditAttribution: chx commentedTo get rid of
gettype
and useempty
to 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.Comment #2
ax CreditAttribution: ax commentedah - thats what your range() was good for. allright - put it back in then.
Comment #3
ax CreditAttribution: ax commentedshouldn't blogapi-clients work in 4.7 (bump)?
Comment #4
chx CreditAttribution: chx commentedComment #5
Dries CreditAttribution: Dries commentedCommitted to HEAD and DRUPAL-4-6. Thanks.
Comment #6
(not verified) CreditAttribution: commented