Suppress a notice when the body element is not passed.
This commit is contained in:
parent
1e76ca74de
commit
911cd4b974
@ -229,10 +229,11 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
|
||||
} else {
|
||||
$payload['type'] = 'chat';
|
||||
}
|
||||
$body = $xml->sub('body');
|
||||
$payload['from'] = $xml->attrs['from'];
|
||||
$payload['body'] = $xml->sub('body')->data;
|
||||
$payload['body'] = is_object($body) ? $body->data : FALSE; // $xml->sub('body')->data;
|
||||
$payload['xml'] = $xml;
|
||||
$this->log->log("Message: {$xml->sub('body')->data}", XMPPHP_Log::LEVEL_DEBUG);
|
||||
$this->log->log("Message: {$payload['body']}", XMPPHP_Log::LEVEL_DEBUG);
|
||||
$this->event('message', $payload);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user