UltrasonicNXT has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263194

Change subject: Fix errors
......................................................................

Fix errors

GetFullURL was being called on a non-object. Not sure how that was
happening, but this should fix it.

Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979
---
M CommentClass.php
M Comments.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Comments 
refs/changes/94/263194/1

diff --git a/CommentClass.php b/CommentClass.php
index 3f465bb..500894d 100644
--- a/CommentClass.php
+++ b/CommentClass.php
@@ -762,8 +762,10 @@
                $output .= $this->getText();
                $output .= '</div>' . "\n";
                $output .= '<div class="c-actions">' . "\n";
-               $output .= '<a href="' . htmlspecialchars( 
$this->page->title->getFullURL() ) . "#comment-{$this->id}\" rel=\"nofollow\">" 
.
+               if ( $this->page->title ) { // for some reason doesn't always 
exist
+                       $output .= '<a href="' . htmlspecialchars( 
$this->page->title->getFullURL() ) . "#comment-{$this->id}\" rel=\"nofollow\">" 
.
                        $this->msg( 'comments-permalink' )->plain() . '</a> ';
+               }
                if ( $replyRow || $dlt ) {
                        $output .= "{$replyRow} {$dlt}" . "\n";
                }
diff --git a/Comments.php b/Comments.php
index 7a18ba5..556a66c 100644
--- a/Comments.php
+++ b/Comments.php
@@ -24,7 +24,7 @@
 $wgExtensionCredits['parserhook'][] = array(
        'path' => __FILE__,
        'name' => 'Comments',
-       'version' => '4.1.0',
+       'version' => '4.1.1',
        'author' => array( 'David Pean', 'Misza', 'Jack Phoenix', 'Adam 
Carter/UltrasonicNXT' ),
        'descriptionmsg' => 'comments-desc',
        'url' => 'https://www.mediawiki.org/wiki/Extension:Comments'

-- 
To view, visit https://gerrit.wikimedia.org/r/263194
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9058d798a3ce663dd906e81cf88190e7e5c6979
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to