mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: RequestHandler::checkAccessAction() breaks when $this->class is null, this happens when you delete a DataObject from ResultForm (list view) in DataAdmin. We use safer call get_class($this) instead.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74633 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1bd388ee92
commit
eb0b76840c
@ -153,7 +153,11 @@ class RequestHandler extends ViewableData {
|
||||
*/
|
||||
function checkAccessAction($action) {
|
||||
$action = strtolower($action);
|
||||
$allowedActions = Object::combined_static($this->class, 'allowed_actions');
|
||||
|
||||
/** $this->class is not a safe call, cos $this->class is not assigned in some circumstance.
|
||||
* we used get_class($this) here
|
||||
*/
|
||||
$allowedActions = Object::combined_static(get_class($this), 'allowed_actions');
|
||||
$newAllowedActions = array();
|
||||
|
||||
// merge in any $allowed_actions from extensions
|
||||
|
Loading…
Reference in New Issue
Block a user