XMLRPC value_calculate_type throws exception
boombatower - April 12, 2008 - 22:59
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | blogapi.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | boombatower |
| Status: | closed |
Description
As noted in http://drupal.org/node/245955 the code throws a warning when the following code in executed.
<?php
$result = xmlrpc($local, 'metaWeblog.newMediaObject', $blog_id, $web_user->name, $web_user->pass_raw, $file);
?>Exception:
Unexpected PHP error [Undefined property: stdClass::$is_date] severity [E_NOTICE] in [~/includes/xmlrpc.inc line 70]
#1
Anyone know if the object was changed or something?
#2
Alright this is a simple issue with a simple fix, just depended on how to do it.
I wrapped the is_* type checks with isset() since they are only set when it is that type rather than always setting the attribute.
Tested BlogAPI test and passes without exception!
#3
I can't really test this patch until XML-RPC tests work again.
Looking at the code, this certainly looks RTBC.
#4
Ok #274994: Simpletest not including tests includes directory was just committed and tests should run, although the xmlrpc test is still broken, due to test issues.
This patch fixes exceptions in Blog API test though.
#5
Also fixes xmlrpc test now that it runs. #268063: Move includes/tests to simpletest/tests & provide hidden .info propery
#6
Fixes the tests. Committed to CVS HEAD.
#7
Automatically closed -- issue fixed for two weeks with no activity.