Commit b47fcb73 authored by sebastian's avatar sebastian

ZP-608 #comment make sure a decoder is available before trying to read wbxml data in exception case

git-svn-id: https://z-push.org/svn/z-push/trunk@1949 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent bbfe372c
...@@ -129,8 +129,11 @@ abstract class RequestProcessor { ...@@ -129,8 +129,11 @@ abstract class RequestProcessor {
// if there is an error decoding wbxml, consume remaining data and include it in the WBXMLException // if there is an error decoding wbxml, consume remaining data and include it in the WBXMLException
if (!$handler->Handle(Request::GetCommandCode())) { if (!$handler->Handle(Request::GetCommandCode())) {
self::$decoder->readRemainingData(); $wbxmlLog = "no decoder";
$wbxmlLog = self::$decoder->getWBXMLLog(); if (self::$decoder) {
self::$decoder->readRemainingData();
$wbxmlLog = self::$decoder->getWBXMLLog();
}
throw new WBXMLException("Debug data: " . $wbxmlLog); throw new WBXMLException("Debug data: " . $wbxmlLog);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment