mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Fixed potential non-object error in LeftAndMain::callPageMethod()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76930 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6c3a3677fe
commit
6bdb807af1
@ -779,6 +779,7 @@ JS;
|
|||||||
$parentID = 0;
|
$parentID = 0;
|
||||||
}
|
}
|
||||||
$_REQUEST['ajax'] = 1;
|
$_REQUEST['ajax'] = 1;
|
||||||
|
$cleanupJS = '';
|
||||||
|
|
||||||
if(is_numeric($id) && is_numeric($parentID) && $id != $parentID) {
|
if(is_numeric($id) && is_numeric($parentID) && $id != $parentID) {
|
||||||
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
$node = DataObject::get_by_id($this->stat('tree_class'), $id);
|
||||||
@ -1103,8 +1104,10 @@ JS;
|
|||||||
*/
|
*/
|
||||||
function callPageMethod($data, $form) {
|
function callPageMethod($data, $form) {
|
||||||
$methodName = $form->buttonClicked()->extraData();
|
$methodName = $form->buttonClicked()->extraData();
|
||||||
$record = $this->CurrentPage();
|
$record = $this->currentPage();
|
||||||
return $record->$methodName($data, $form);
|
if(!$record) return false;
|
||||||
|
|
||||||
|
return $record->$methodName($data, $form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user