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() {
|
||||
if($this->TrackBacksEnabled()) {
|
||||
return $this->extInstance('TrackBackDecorator')->trackbackping();
|
||||
if($this->TrackBacksEnabled() && $this->hasExtension('TrackBackDecorator')) {
|
||||
return $this->decoratedTrackbackping();
|
||||
} else {
|
||||
Director::redirect($this->Link());
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class TrackBackDecorator extends DataObjectDecorator {
|
||||
return $this->owner->AbsoluteLink() . 'trackbackping';
|
||||
}
|
||||
|
||||
function trackbackping() {
|
||||
function decoratedTrackbackping() {
|
||||
$error = 0;
|
||||
$message = '';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user