1
0
Fork 0

Fix lax validation of packages when loading them, fixes #3606, fixes #3605

pull/3614/head
Jordi Boggiano 2015-01-02 07:52:56 +00:00
parent ddc1d377d7
commit e172cd81a1
2 changed files with 3 additions and 4 deletions

View File

@ -154,8 +154,7 @@ class JsonFile
if ($schema === self::LAX_SCHEMA) {
$schemaData->additionalProperties = true;
$schemaData->properties->name->required = false;
$schemaData->properties->description->required = false;
$schemaData->required = array();
}
$validator = new Validator();

View File

@ -21,10 +21,10 @@ class JsonValidationException extends Exception
{
protected $errors;
public function __construct($message, $errors = array())
public function __construct($message, $errors = array(), \Exception $previous = null)
{
$this->errors = $errors;
parent::__construct($message);
parent::__construct($message, 0, $previous);
}
public function getErrors()