mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
BUGFIX: trackbackping generated an exception. getExtensionInstance returns an instance with NULL owner so TrackBackDecorator->owner->ID was always unavailable
This commit is contained in:
parent
af3b912749
commit
a41cf18c23
@ -160,8 +160,8 @@ class BlogEntry extends Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function trackbackping() {
|
function trackbackping() {
|
||||||
if($this->TrackBacksEnabled()) {
|
if($this->TrackBacksEnabled() && $this->hasExtension('TrackBackDecorator')) {
|
||||||
return $this->extInstance('TrackBackDecorator')->trackbackping();
|
return $this->decoratedTrackbackping();
|
||||||
} else {
|
} else {
|
||||||
Director::redirect($this->Link());
|
Director::redirect($this->Link());
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class TrackBackDecorator extends DataObjectDecorator {
|
|||||||
return $this->owner->AbsoluteLink() . 'trackbackping';
|
return $this->owner->AbsoluteLink() . 'trackbackping';
|
||||||
}
|
}
|
||||||
|
|
||||||
function trackbackping() {
|
function decoratedTrackbackping() {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user