1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-22 16:40:21 +01:00

Merge pull request from marc1706/ticket/15011

[ticket/15011] Output meaningful errors when validating all metadata

* marc1706/ticket/15011:
  [ticket/15011] Output meaningful errors when validating all metadata
This commit is contained in:
Tristan Darricau 2017-01-15 18:15:00 +01:00
commit 0f640ab7af
No known key found for this signature in database
GPG Key ID: 817043C2E29DB881

@ -230,9 +230,19 @@ class metadata_manager
case 'all':
$this->validate('display');
if (!$this->validate_enable())
if (!$this->validate_dir())
{
throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', $name));
throw new \phpbb\extension\exception($this->user->lang('EXTENSION_DIR_INVALID'));
}
if (!$this->validate_require_phpbb())
{
throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'soft-require'));
}
if (!$this->validate_require_php())
{
throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'require php'));
}
break;