mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix some possible errors
This commit is contained in:
parent
fece81e5e7
commit
4e0d44a43e
@ -258,7 +258,7 @@ class AppController extends Controller
|
||||
|
||||
public function addAdminError($controller, $action, array $returnTable, $state_user_id) {
|
||||
if(!is_array($returnTable)) {
|
||||
$this->addAdminError('AppController', 'addAdminError', ['state' => 'error', 'msg' => 'returnTable isn\'t array', 'details' => gettype($returnTable)]);
|
||||
$this->addAdminError('AppController', 'addAdminError', ['state' => 'error', 'msg' => 'returnTable isn\'t array', 'details' => gettype($returnTable)], $state_user_id);
|
||||
return false;
|
||||
}
|
||||
$adminErrorTable = TableRegistry::getTableLocator()->get('AdminErrors');
|
||||
@ -277,6 +277,7 @@ class AppController extends Controller
|
||||
$this->Flash->error(
|
||||
__('Serious error, couldn\'t save to db, please write the admin: ' . $this->getAdminEmailLink()),
|
||||
['escape' => false]);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -57,7 +57,11 @@ class StateBalancesController extends AppController
|
||||
if('success' == $gdtEntries['state'] && 'success' == $gdtEntries['data']['state']) {
|
||||
$gdtSum = intval($gdtEntries['data']['sum']);
|
||||
} else {
|
||||
$this->addAdminError('StateBalancesController', 'overview', $gdtEntries, $user->id);
|
||||
if($user) {
|
||||
$this->addAdminError('StateBalancesController', 'overview', $gdtEntries, $user['id']);
|
||||
} else {
|
||||
$this->addAdminError('StateBalancesController', 'overview', $gdtEntries, 0);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//
|
||||
@ -205,7 +209,7 @@ class StateBalancesController extends AppController
|
||||
$this->set('publishers', $publishers);
|
||||
}
|
||||
} else {
|
||||
$this->addAdminError('StateBalancesController', 'overviewGdt', $requestResult, $user->id);
|
||||
$this->addAdminError('StateBalancesController', 'overviewGdt', $requestResult, $user['id']);
|
||||
$this->Flash->error(__('Fehler beim GDT Server, bitte abwarten oder den Admin benachrichtigen!'));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user