Alex Monk has submitted this change and it was merged.

Change subject: Fix PHP Notice when viewing history of a non-existing thread
......................................................................


Fix PHP Notice when viewing history of a non-existing thread

PHP Notice: Vector/VectorTemplate.php: Undefined index: href

Bug: 38334
Change-Id: I13785361fb5042062d3b0ec650450b48102f88fb
---
M pages/ThreadHistoryListingView.php
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Alex Monk: Verified; Looks good to me, approved



diff --git a/pages/ThreadHistoryListingView.php 
b/pages/ThreadHistoryListingView.php
index a3a5722..e388479 100644
--- a/pages/ThreadHistoryListingView.php
+++ b/pages/ThreadHistoryListingView.php
@@ -31,7 +31,10 @@
 
        function customizeNavigation( $skin, &$links ) {
                parent::customizeNavigation( $skin, $links );
-               $links['views']['history']['class'] = 'selected';
-               $links['views']['view']['class'] = '';
+               // Not present if thread does not exist
+               if ( isset( $links['views']['history'] ) ) {
+                       $links['views']['history']['class'] = 'selected';
+                       $links['views']['view']['class'] = '';
+               }
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13785361fb5042062d3b0ec650450b48102f88fb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Alex Monk <kren...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to