Last modified: 2010-05-15 15:54:54 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 T15649, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13649 - wfTimestamp() called with illegal output type
wfTimestamp() called with illegal output type
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.12.x
All All
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
: crosswiki
: 13923 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-08 08:29 UTC by Nicolas Brouard
Modified: 2010-05-15 15:54 UTC (History)
2 users (show)

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


Attachments

Description Nicolas Brouard 2008-04-08 08:29:44 UTC
I use a wiki server similar to commons which transcludes images to other servers. And I got the following error when trying to edit a page concerning an image description:
Exception from line 1475 of /var/www/html/mediawiki/phase3/includes/GlobalFunctions.php: wfTimestamp() called with illegal output type.

Looking at getTimestamp() called in File.php, I  found that the first argument is missing. Thus I added 0:
	function getTimestamp() {
		$path = $this->getPath();
		if ( !file_exists( $path ) ) {
			return false;
		}
		return wfTimestamp(0, filemtime( $path ) );
	}
And it works now but I am surprised by this bug and my response is only a workaround.
Comment 1 Brion Vibber 2008-04-09 00:27:50 UTC
This was fixed on trunk in r32815.

Copied to 1.12 branch in r33000
Comment 2 Brion Vibber 2008-05-01 22:11:42 UTC
*** Bug 13923 has been marked as a duplicate of this bug. ***
Comment 3 Lionel Brits 2008-05-01 22:28:55 UTC
When I implement this fix on 1.12.0, I get the following error:

Warning: Invalid argument supplied for foreach() in /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/ImagePage.php on line 428

Is there a more complete work-around besides upgrading?

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


Navigation
Links