Last modified: 2011-11-10 08:46:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34231, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32231 - Warning: gzwrite() expects parameter 1 to be resource, boolean given
Warning: gzwrite() expects parameter 1 to be resource, boolean given
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-06 19:18 UTC by Niklas Laxström
Modified: 2011-11-10 08:46 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
add traceback when boolean used as a file handle (476 bytes, patch)
2011-11-07 10:10 UTC, Antoine "hashar" Musso (WMF)
Details

Description Niklas Laxström 2011-11-06 19:18:02 UTC
PHP Warning:  gzwrite() expects parameter 1 to be resource, boolean given in /www/w/maintenance/generateSitemap.php on line 358

When generating sitemap, obviously.
Comment 1 Antoine "hashar" Musso (WMF) 2011-11-07 10:10:08 UTC
Created attachment 9368 [details]
add traceback when boolean used as a file handle

I can not reproduce locally.

Looks like at some point a file could not be opened hence $this->file receive the 'false' value which is then used as a file handle.

One way to track this issue would be to add a check in the write function so it emits a stack trace when a boolean is used as a handle. See attached patch.
Comment 2 Niklas Laxström 2011-11-09 20:36:46 UTC
I think hashar committed some fail-fast code for this.
Comment 3 Sumana Harihareswara 2011-11-09 21:23:10 UTC
+patch, +need-review
Comment 4 Niklas Laxström 2011-11-10 08:46:28 UTC
Now checked, committed in r102286.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links