AuthBackendPage: Don't crash while validating an external backend's config

This commit is contained in:
Johannes Meyer 2015-07-30 16:00:04 +02:00
parent a8415caf24
commit c57bc30e67

View File

@ -171,7 +171,10 @@ class AuthBackendPage extends Form
{
if (isset($formData['backend_validation']) && parent::isValid($formData)) {
$self = clone $this;
$self->getSubForm('backend_form')->getElement('resource')->setIgnore(false);
if (($resourceElement = $self->getSubForm('backend_form')->getElement('resource')) !== null) {
$resourceElement->setIgnore(false);
}
$inspection = UserBackendConfigForm::inspectUserBackend($self);
if ($inspection !== null) {
$join = function ($e) use (& $join) {