diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index 19ccd445a3287eb85fa644963f398c32117198ed..c7751e1c1caf3416f7c565573c9f3052da4ef0ca 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -256,7 +256,7 @@ function xmlrpc_message_tag_close($parser, $tag) {
     case 'value':
       // If no type is indicated, the type is string
       // We take special care for empty values
-      if (trim($xmlrpc_message->current_tag_contents) != '' || $xmlrpc_message->last_open == 'value') {
+      if (trim($xmlrpc_message->current_tag_contents) != '' || (isset($xmlrpc_message->last_open) && ($xmlrpc_message->last_open == 'value'))) {
         $value = (string)$xmlrpc_message->current_tag_contents;
         $value_flag = TRUE;
       }