r108050 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108049‎ | r108050 | r108051 >
Date:16:29, 4 January 2012
Author:mah
Status:ok (Comments)
Tags:
Comment:
Attempt to avoid a warning I got during input:

$ 7z x -so ../dewikisource-20111012-pages-meta-history.xml.7z | php maintenance/importDump.php

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: ../dewikisource-20111012-pages-meta-history.xml.7z

Extracting dewikisource-20111012-pages-meta-history.xml
PHP Notice: Undefined index: wgExtensionAliasesFiles in /home/mah/work/code/mediawiki/mw-
svn/includes/cache/CacheDependency.php on line 386
PHP Stack trace:
PHP 1. {main}() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:0
PHP 2. require_once() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:287
PHP 3. BackupReader->execute() /home/mah/work/code/mediawiki/mw-svn/maintenance/doMaintenance.php:105
PHP 4. BackupReader->importFromStdin() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:93
PHP 5. BackupReader->importFromHandle() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:249
PHP 6. WikiImporter->doImport() /home/mah/work/code/mediawiki/mw-svn/maintenance/importDump.php:282
PHP 7. WikiImporter->handlePage() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:411
PHP 8. WikiImporter->processTitle() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:534
PHP 9. Title->userCan() /home/mah/work/code/mediawiki/mw-svn/includes/Import.php:788
PHP 10. Title->getUserPermissionsErrorsInternal() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:1557
PHP 11. Title->checkSpecialsAndNSPermissions() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:2118
PHP 12. Title->getNsText() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:1728
PHP 13. Language->needsGenderDistinction() /home/mah/work/code/mediawiki/mw-svn/includes/Title.php:723
PHP 14. LocalisationCache->getItem() /home/mah/work/code/mediawiki/mw-svn/languages/Language.php:442
PHP 15. LocalisationCache->loadItem() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:218
PHP 16. LocalisationCache->initLanguage() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:283
PHP 17. LocalisationCache->isExpired() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:395
PHP 18. GlobalDependency->isExpired() /home/mah/work/code/mediawiki/mw-svn/includes/LocalisationCache.php:367
Modified paths:
  • /trunk/phase3/includes/cache/CacheDependency.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/cache/CacheDependency.php
@@ -383,6 +383,9 @@
384384 * @return bool
385385 */
386386 function isExpired() {
 387+ if( !isset($GLOBALS[$this->name]) ) {
 388+ return true;
 389+ }
387390 return $GLOBALS[$this->name] != $this->value;
388391 }
389392 }

Comments

#Comment by 😂 (talk | contribs)   14:46, 5 January 2012

Probably ok, but I'm curious why the warning was happening to begin with.

#Comment by MarkAHershberger (talk | contribs)   17:16, 5 January 2012

I don't know and didn't have time to investigate... so I left a full backtrace. ;)

Status & tagging log