Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -80,6 +80,10 @@ |
81 | 81 | global $wgCollectionFormats; |
82 | 82 | global $wgCollectionPortletFormats; |
83 | 83 | global $wgScriptPath; |
| 84 | + |
| 85 | + if ( is_null( $wgTitle ) || !$wgTitle->exists() ) { |
| 86 | + return; |
| 87 | + } |
84 | 88 | |
85 | 89 | $namespace = $wgTitle->getNamespace(); |
86 | 90 | |
— | — | @@ -216,6 +220,10 @@ |
217 | 221 | return true; |
218 | 222 | } |
219 | 223 | |
| 224 | + if ( is_null( $wgTitle ) || !$wgTitle->exists() ) { |
| 225 | + return true; |
| 226 | + } |
| 227 | + |
220 | 228 | $namespace = $wgTitle->getNamespace(); |
221 | 229 | if ( !in_array( $namespace, $wgCollectionArticleNamespaces ) |
222 | 230 | && $namespace != NS_CATEGORY ) { |