As noted in http://drupal.org/node/245955 the code throws a warning when the following code in executed.

$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]
CommentFileSizeAuthor
#2 xmlrpc-type-checks.patch818 bytesboombatower

Comments

boombatower’s picture

Anyone know if the object was changed or something?

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
StatusFileSize
new818 bytes

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!

dries’s picture

I can't really test this patch until XML-RPC tests work again.

Looking at the code, this certainly looks RTBC.

boombatower’s picture

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.

boombatower’s picture

dries’s picture

Status: Needs review » Fixed

Fixes the tests. Committed to CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.