mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fixed php warning
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39064 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
32995ceadc
commit
78ee5b5d30
@ -158,8 +158,8 @@ class SiteTree extends DataObject {
|
|||||||
*/
|
*/
|
||||||
protected function prepareCurrentAndSection() {
|
protected function prepareCurrentAndSection() {
|
||||||
if(!self::$currentPageID) {
|
if(!self::$currentPageID) {
|
||||||
self::$currentPageID = Director::currentPage()->ID;
|
self::$currentPageID = Director::currentPage() ? Director::currentPage()->ID : null;
|
||||||
if(!self::$currentPageID) {
|
if(!isset(self::$currentPageID)) {
|
||||||
self::$currentPageID = -1;
|
self::$currentPageID = -1;
|
||||||
$nextID = isset(Director::currentPage()->Parent->ID) ? Director::currentPage()->Parent->ID : null;
|
$nextID = isset(Director::currentPage()->Parent->ID) ? Director::currentPage()->Parent->ID : null;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user