http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69044
Revision: 69044
Author: siebrand
Date: 2010-07-05 06:21:43 +0000 (Mon, 05 Jul 2010)
Log Message:
-----------
Add check to prevent Call to a member function getId() on a non-object
Modified Paths:
--------------
trunk/extensions/Translate/TranslatePage.php
Modified: trunk/extensions/Translate/TranslatePage.php
===================================================================
--- trunk/extensions/Translate/TranslatePage.php 2010-07-05 05:18:08 UTC
(rev 69043)
+++ trunk/extensions/Translate/TranslatePage.php 2010-07-05 06:21:43 UTC
(rev 69044)
@@ -252,7 +252,10 @@
$selector = new HTMLSelector( 'task', 'task',
$this->options['task'] );
// Check if this is a page translation group to return only
appropriate tasks.
- $isPageTranslation = strpos( $this->group->getId(), 'page|' )
=== 0;
+ $isPageTranslation = false;
+ if( $this->group ) {
+ $isPageTranslation = strpos( $this->group->getId(),
'page|' ) === 0;
+ }
foreach ( TranslateTasks::getTasks( $isPageTranslation ) as $id
) {
$label = call_user_func( array( 'TranslateTask',
'labelForTask' ), $id );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs