Skip to content

Commit 43ba678

Browse files
committed
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/15011] Output meaningful errors when validating all metadata
2 parents c4ee378 + 0f640ab commit 43ba678

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

phpBB/phpbb/extension/metadata_manager.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,19 @@ public function validate($name = 'display')
214214
case 'all':
215215
$this->validate('display');
216216

217-
if (!$this->validate_enable())
217+
if (!$this->validate_dir())
218218
{
219-
throw new \phpbb\extension\exception('META_FIELD_NOT_SET', array($name));
219+
throw new \phpbb\extension\exception('EXTENSION_DIR_INVALID');
220+
}
221+
222+
if (!$this->validate_require_phpbb())
223+
{
224+
throw new \phpbb\extension\exception('META_FIELD_NOT_SET', array('soft-require'));
225+
}
226+
227+
if (!$this->validate_require_php())
228+
{
229+
throw new \phpbb\extension\exception('META_FIELD_NOT_SET', array('require php'));
220230
}
221231
break;
222232

0 commit comments

Comments
 (0)