Fixed nulled organisation name
This commit is contained in:
@@ -359,10 +359,10 @@ class OrganisationController extends SimpleController
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($source, $target, $currentUser) {
|
||||
$sourceName = $source->name;
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($source, $target, $currentUser, $sourceName) {
|
||||
$this->ci->get('organisation.beforeMerge')($source, $target);
|
||||
|
||||
$source->beforeMerge($target, ['currentUser' => $currentUser]);
|
||||
@@ -431,10 +431,10 @@ class OrganisationController extends SimpleController
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($organisation, $currentUser) {
|
||||
$organisationName = $organisation->name;
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($organisation, $currentUser, $organisationName) {
|
||||
// Delete the organisation (soft)
|
||||
$organisation->delete();
|
||||
unset($organisation);
|
||||
|
||||
@@ -206,10 +206,10 @@ class OrganisationRegistrationController extends SimpleController
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($organisation, $currentUser) {
|
||||
$organisationName = $organisation->name;
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($organisation, $currentUser, $organisationName) {
|
||||
// Delete the organisation
|
||||
$organisation->delete(true);
|
||||
unset($organisation);
|
||||
|
||||
Reference in New Issue
Block a user