Last modified: 2012-08-20 22:42:48 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 T41516, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39516 - Call to a member function format() on a non-object
Call to a member function format() on a non-object
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Unprioritized minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 39515
  Show dependency treegraph
 
Reported: 2012-08-20 22:17 UTC by Sam Reed (reedy)
Modified: 2012-08-20 22:42 UTC (History)
2 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-08-20 22:17:10 UTC
Fatal error:  Call to a member function format() on a non-object in /usr/local/apache/common-local/php-1.20wmf10/includes/GlobalFunctions.php on line 984


 * @return DateTime DateTime object on success or false on failure.


Seems we get returned false, so we don't have a DateTime object...
Comment 1 Sam Reed (reedy) 2012-08-20 22:17:51 UTC
Warning:  date_create() expects parameter 2 to be DateTimeZone, null given in /usr/local/apache/common-local/php-1.20wmf10/includes/GlobalFunctions.php on line 982
Comment 2 Sam Reed (reedy) 2012-08-20 22:37:02 UTC
> var_dump( date_create( "now", null ) );
PHP Warning:  date_create() expects parameter 2 to be DateTimeZone, null given in /home/wikipedia/common/php-1.20wmf10/maintenance/eval.php(72) : eval()'d code on line 1

Warning: date_create() expects parameter 2 to be DateTimeZone, null given in /home/wikipedia/common/php-1.20wmf10/maintenance/eval.php(72) : eval()'d code on line 1
bool(false)

> var_dump( date_create( "now" ) );
object(DateTime)#24 (3) {
  ["date"]=>
  string(19) "2012-08-20 22:36:46"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "UTC"
}
Comment 3 Sam Reed (reedy) 2012-08-20 22:39:47 UTC
Seems it's a PHP 5.3.2 bug https://bugs.php.net/bug.php?id=52063

Fixed in > 5.3.2
Comment 4 Sam Reed (reedy) 2012-08-20 22:42:48 UTC
https://gerrit.wikimedia.org/r/20831

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


Navigation
Links