From a0bd23b74728ab6aa2a3e37197e4cc34bfe3ff38 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 15 Jan 2017 17:56:12 +0100 Subject: [ticket/15011] Output meaningful errors when validating all metadata PHPBB3-15011 --- phpBB/phpbb/extension/metadata_manager.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index 35a88d6991..107907609b 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -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; -- cgit v1.2.1