Download & Extend

XMLRPC value_calculate_type throws exception

Project:Drupal core
Version:7.x-dev
Component:blogapi.module
Category:bug report
Priority:normal
Assigned:boombatower
Status:closed (fixed)

Issue Summary

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]

Comments

#1

Anyone know if the object was changed or something?

#2

Assigned to:Anonymous» boombatower
Status:active» needs review

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!

AttachmentSizeStatusTest resultOperations
xmlrpc-type-checks.patch818 bytesIgnored: Check issue status.NoneNone

#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

#6

Status:needs review» fixed

Fixes the tests. Committed to CVS HEAD.

#7

Status:fixed» closed (fixed)

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