PMCORE-1578

PMCORE-1559 Review this error: Call to a member function initRBAC() on null.
This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-05-28 17:52:47 -04:00
committed by Paula Quispe
parent 3b01936b58
commit 517c94aa78
3 changed files with 18 additions and 6 deletions

View File

@@ -185,9 +185,13 @@ class JobsManager
public function dispatch($name, $callback)
{
$environment = $this->getDataSnapshot();
$instance = $name::dispatch(function() use ($callback, $environment) {
global $RBAC;
$referrerRBAC = $RBAC;
$instance = $name::dispatch(function() use ($callback, $environment, $referrerRBAC) {
try {
global $RBAC;
$RBAC = $referrerRBAC;
$this->recoverDataSnapshot($environment);
$callback($environment);
} catch (Exception $e) {

View File

@@ -33,6 +33,7 @@ class SubApplication extends Model
'SA_INIT_DATE' => '',
'SA_FINISH_DATE' => ''
];
/**
* The attributes that are mass assignable.
*
@@ -49,4 +50,5 @@ class SubApplication extends Model
'SA_INIT_DATE',
'SA_FINISH_DATE'
];
}
}