Testing the build of XML. If it is invalid will generate a Exception.

This commit is contained in:
Juan Basso 2010-10-24 22:42:05 -02:00
parent c6c3295c5c
commit cda0ce4727

View file

@ -175,6 +175,7 @@ class RequestHandlerComponent extends Component {
if (!class_exists('Xml')) {
App::import('Core', 'Xml');
}
try {
$xml = Xml::build(trim(file_get_contents('php://input')));
if (isset($xml->data)) {
@ -182,6 +183,7 @@ class RequestHandlerComponent extends Component {
} else {
$controller->data = Xml::toArray($xml);
}
} catch (Exception $e) {}
}
}