assert(isset($messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST]));
// Save node list
- $nodeList = unserialize(base64_decode($messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST]));
+ $nodeList = json_decode(base64_decode($messageData[XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST]));
// Make sure it is completely decoded
assert(is_array($nodeList));
assert(count($nodeList) > 0);
// Set it in configuration
- $this->getConfigInstance()->setConfigEntry('dht_nodes', base64_encode(serialize($nodeList)));
+ $this->getConfigInstance()->setConfigEntry('dht_nodes', base64_encode(json_encode($nodeList)));
}
/**
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REQUEST-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Got a node list of ' . count($nodeList) . ' entry/-ies back.');
// Set it serialized in configuration (temporarily)
- $this->getConfigInstance()->setConfigEntry('node_list', base64_encode(serialize($nodeList)));
+ $this->getConfigInstance()->setConfigEntry('node_list', base64_encode(json_encode($nodeList)));
// Translate last exception into a status code
$statusCode = $this->getTranslatedStatusFromLastException();
// Some sanity checks
if ((empty($app)) || (is_null($app))) {
// Something went wrong!
- ApplicationEntryPoint::app_exit(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
+ ApplicationEntryPoint::app_exit(sprintf('[Main:] The application <span class="app_name">%s</span> could not be launched because the helper class <span class="class_name">%s</span> is not loaded.',
$application,
FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class')
));
} elseif (!is_object($app)) {
// No object!
- ApplicationEntryPoint::app_exit(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because 'app' is not an object.",
+ ApplicationEntryPoint::app_exit(sprintf('[Main:] The application <span class="app_name">%s</span> could not be launched because 'app' is not an object.',
$application
));
} elseif (!method_exists($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method'))) {
// Method not found!
- ApplicationEntryPoint::app_exit(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
+ ApplicationEntryPoint::app_exit(sprintf('[Main:] The application <span class="app_name">%s</span> could not be launched because the method <span class="method_name">%s</span> is missing.',
$application,
FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')
));