Index: branches/wmf/1.16wmf4/extensions/LiquidThreads/classes/View.php |
— | — | @@ -110,6 +110,10 @@ |
111 | 111 | |
112 | 112 | static function linkInContextData( $thread, $contextType = 'page' ) { |
113 | 113 | $query = array(); |
| 114 | + |
| 115 | + if ( ! $thread ) { |
| 116 | + throw new MWException( "Null thread passed to linkInContextData" ); |
| 117 | + } |
114 | 118 | |
115 | 119 | if ( $contextType == 'page' ) { |
116 | 120 | $title = clone $thread->article()->getTitle(); |
— | — | @@ -1871,6 +1875,10 @@ |
1872 | 1876 | array( 'id' => 'lqt-thread-sortkey-' . $thread->id() ) |
1873 | 1877 | ); |
1874 | 1878 | } |
| 1879 | + |
| 1880 | + if ( ! $thread->title() ) { |
| 1881 | + throw new MWException( "Thread ".$thread->id()." has null title" ); |
| 1882 | + } |
1875 | 1883 | |
1876 | 1884 | // Add the thread's title |
1877 | 1885 | $html .= Xml::hidden( |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads/classes/View.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
1878 | 1886 | - /branches/wmf-deployment/extensions/LiquidThreads/classes/View.php:60970 |
/trunk/extensions/LiquidThreads/classes/View.php:57390,63727-63971,64736 |
1879 | 1887 | + /branches/wmf-deployment/extensions/LiquidThreads/classes/View.php:60970 |
/trunk/extensions/LiquidThreads/classes/View.php:57390,63727-63971,64736,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads/classes/Thread.php |
— | — | @@ -1302,7 +1302,9 @@ |
1303 | 1303 | } |
1304 | 1304 | |
1305 | 1305 | function rootRevision() { |
1306 | | - if ( !$this->isHistorical() || !isset( $this->topmostThread()->threadRevision ) ) { |
| 1306 | + if ( !$this->isHistorical() || |
| 1307 | + !isset( $this->topmostThread()->threadRevision ) || |
| 1308 | + ! $this->root() ) { |
1307 | 1309 | return null; |
1308 | 1310 | } |
1309 | 1311 | |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads/classes/Thread.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
1310 | 1312 | - /branches/wmf-deployment/extensions/LiquidThreads/classes/Thread.php:60970 |
/trunk/extensions/LiquidThreads/classes/Thread.php:57390,63727-63971,64762,64766 |
1311 | 1313 | + /branches/wmf-deployment/extensions/LiquidThreads/classes/Thread.php:60970 |
/trunk/extensions/LiquidThreads/classes/Thread.php:57390,63727-63971,64762,64766,64920 |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads/classes |
___________________________________________________________________ |
Name: svn:mergeinfo |
1312 | 1314 | + /branches/wmf-deployment/extensions/LiquidThreads/classes:60970 |
/trunk/extensions/LiquidThreads/classes:57390,63727-63971,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads/pages/ThreadPermalinkView.php |
— | — | @@ -28,6 +28,10 @@ |
29 | 29 | unset( $content_actions['viewsource'] ); |
30 | 30 | unset( $content_actions['talk'] ); |
31 | 31 | |
| 32 | + if ( ! $view->thread->title() ) { |
| 33 | + throw new MWException( "Thread ".$view->thread->id()." has null title" ); |
| 34 | + } |
| 35 | + |
32 | 36 | $subpage = $view->thread->title()->getPrefixedText(); |
33 | 37 | |
34 | 38 | // Repoint move/delete/history tabs |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads/pages |
___________________________________________________________________ |
Name: svn:mergeinfo |
35 | 39 | + /branches/wmf-deployment/extensions/LiquidThreads/pages:60970 |
/trunk/extensions/LiquidThreads/pages:57390,63727-63971,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads/api/ApiFeedLQTThreads.php |
— | — | @@ -179,6 +179,10 @@ |
180 | 180 | $root = new Article( Title::newFromText( $thread ) ); |
181 | 181 | $thread = Threads::withRoot( $root ); |
182 | 182 | |
| 183 | + if ( ! $thread ) { |
| 184 | + continue; |
| 185 | + } |
| 186 | + |
183 | 187 | $threadCond = array( |
184 | 188 | 'thread_ancestor' => $thread->id(), |
185 | 189 | 'thread_id' => $thread->id() |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads/api |
___________________________________________________________________ |
Name: svn:mergeinfo |
186 | 190 | + /branches/wmf-deployment/extensions/LiquidThreads/api:60970 |
/trunk/extensions/LiquidThreads/api:57390,63727-63971,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes/View.php |
— | — | @@ -110,6 +110,10 @@ |
111 | 111 | |
112 | 112 | static function linkInContextData( $thread, $contextType = 'page' ) { |
113 | 113 | $query = array(); |
| 114 | + |
| 115 | + if ( ! $thread ) { |
| 116 | + throw new MWException( "Null thread passed to linkInContextData" ); |
| 117 | + } |
114 | 118 | |
115 | 119 | if ( $contextType == 'page' ) { |
116 | 120 | $title = clone $thread->article()->getTitle(); |
— | — | @@ -1868,6 +1872,10 @@ |
1869 | 1873 | array( 'id' => 'lqt-thread-sortkey-' . $thread->id() ) |
1870 | 1874 | ); |
1871 | 1875 | } |
| 1876 | + |
| 1877 | + if ( ! $thread->title() ) { |
| 1878 | + throw new MWException( "Thread ".$thread->id()." has null title" ); |
| 1879 | + } |
1872 | 1880 | |
1873 | 1881 | // Add the thread's title |
1874 | 1882 | $html .= Xml::hidden( |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes/Thread.php |
— | — | @@ -1302,7 +1302,9 @@ |
1303 | 1303 | } |
1304 | 1304 | |
1305 | 1305 | function rootRevision() { |
1306 | | - if ( !$this->isHistorical() || !isset( $this->topmostThread()->threadRevision ) ) { |
| 1306 | + if ( !$this->isHistorical() || |
| 1307 | + !isset( $this->topmostThread()->threadRevision ) || |
| 1308 | + ! $this->root() ) { |
1307 | 1309 | return null; |
1308 | 1310 | } |
1309 | 1311 | |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes/Thread.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
1310 | 1312 | - /branches/wmf-deployment/extensions/LiquidThreads_alpha/classes/Thread.php:60970 |
/trunk/extensions/LiquidThreads/classes/Thread.php:57390,63727-63971,64762,64766 |
1311 | 1313 | + /branches/wmf-deployment/extensions/LiquidThreads_alpha/classes/Thread.php:60970 |
/trunk/extensions/LiquidThreads/classes/Thread.php:57390,63727-63971,64762,64766,64920 |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes |
___________________________________________________________________ |
Name: svn:mergeinfo |
1312 | 1314 | + /branches/wmf-deployment/extensions/LiquidThreads_alpha/classes:60970 |
/trunk/extensions/LiquidThreads/classes:57390,63727-63971,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/pages/ThreadPermalinkView.php |
— | — | @@ -28,6 +28,10 @@ |
29 | 29 | unset( $content_actions['viewsource'] ); |
30 | 30 | unset( $content_actions['talk'] ); |
31 | 31 | |
| 32 | + if ( ! $view->thread->title() ) { |
| 33 | + throw new MWException( "Thread ".$view->thread->id()." has null title" ); |
| 34 | + } |
| 35 | + |
32 | 36 | $subpage = $view->thread->title()->getPrefixedText(); |
33 | 37 | |
34 | 38 | // Repoint move/delete/history tabs |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/pages |
___________________________________________________________________ |
Name: svn:mergeinfo |
35 | 39 | + /branches/wmf-deployment/extensions/LiquidThreads_alpha/pages:60970 |
/trunk/extensions/LiquidThreads/pages:57390,63727-63971,64920 |
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/api/ApiFeedLQTThreads.php |
— | — | @@ -179,6 +179,10 @@ |
180 | 180 | $root = new Article( Title::newFromText( $thread ) ); |
181 | 181 | $thread = Threads::withRoot( $root ); |
182 | 182 | |
| 183 | + if ( ! $thread ) { |
| 184 | + continue; |
| 185 | + } |
| 186 | + |
183 | 187 | $threadCond = array( |
184 | 188 | 'thread_ancestor' => $thread->id(), |
185 | 189 | 'thread_id' => $thread->id() |
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/api |
___________________________________________________________________ |
Name: svn:mergeinfo |
186 | 190 | + /branches/wmf-deployment/extensions/LiquidThreads_alpha/api:60970 |
/trunk/extensions/LiquidThreads/api:57390,63727-63971,64920 |