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:
Normann Lou 2009-04-16 22:41:14 +00:00
parent 1bd388ee92
commit eb0b76840c

View File

@ -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