Skip to content
Snippets Groups Projects
Commit cf81f8f4 authored by Liam Morland's avatar Liam Morland Committed by Lily Yan
Browse files

ISTWCMS-5418: Only call logger() when it exists in UwDrushCommands::updatePermissions()

The logger() may not exist if this is called outside of Drush.
parent cda68db3
No related branches found
No related tags found
1 merge request!249ISTWCMS-5479: auth site release
......@@ -105,11 +105,16 @@ class UwDrushCommands extends DrushCommands {
UwRoles::setUwPermissions($uw_role, $additional);
// Set message for specific role setting permissions.
$this->logger()->success('Permissions set for ' . $uw_role['label'] . '.');
// The logger() may not exist if this is called outside of Drush.
if ($this->logger()) {
$this->logger()->success('Permissions set for ' . $uw_role['label'] . '.');
}
}
// Set message for command completed.
$this->logger()->success('All permissions set.');
if ($this->logger()) {
$this->logger()->success('All permissions set.');
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment