Page MenuHomePhabricator

BitmapMetadataHandlerTest::testIPTCDatesInvalid() failing under hhvm
Closed, ResolvedPublic

Description

There was 1 failure:

  1. BitmapMetadataHandlerTest::testIPTCDatesInvalid

Failed asserting that true is false.

/www/mediawiki/core/tests/phpunit/includes/media/BitmapMetadataHandlerTest.php:87
/www/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:116
/www/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:80
/www/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:64


Version: 1.22.0
Severity: normal

Details

Reference
bz55532

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:21 AM
bzimport set Reference to bz55532.
bzimport added a subscriber: Unknown Object (MLST).

I'm pretty sure this be an +upstream bug, but the ext/exif code is kind of hard to follow :)

This is indeed an upstream bug:

$ php -v
PHP 5.3.10-1ubuntu3.9+wmf1 with Suhosin-Patch (cli) (built: Dec 13 2013 17:12:38) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
$ hhvm --version
HipHop VM v2.3.2 (rel)
Compiler: heads/HHVM-2.3-0-g3fa32fab6e2373a26a5ba6167b750eeaaf0052c2
Repo schema: e163dcc55f565103c06bfcdb714b619a58ba4e3a
$ php -r "var_dump( date_create( '19420713250502' ) );"
bool(false)
$ hhvm --php -r "var_dump( date_create( '19420713250502' ) );"
object(DateTime)#1 (0) {
}
$ php -r "var_dump( new DateTime( '19420713250502' ) );"
PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (19420713250502) at position 12 (0): Unexpected character' in Command line code:1
Stack trace:
#0 Command line code(1): DateTime->__construct('19420713250502')
#1 {main}
  thrown in Command line code on line 1

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (19420713250502) at position 12 (0): Unexpected character' in Command line code on line 1

Exception: DateTime::__construct(): Failed to parse time string (19420713250502) at position 12 (0): Unexpected character in Command line code on line 1

Call Stack:
    0.0001     626480   1. {main}() Command line code:0
    0.0001     627336   2. DateTime->__construct() Command line code:1

$ hhvm --php -r "var_dump( new DateTime( '19420713250502' ) );"
object(DateTime)#1 (0) {
}

It appears to have been fixed three weeks ago, in https://github.com/facebook/hhvm/commit/9d80cda2cd96f36d506cb0b6bc0675a650265c2f. The patch did not make it into HHVM 2.3.2 but should be part of the next release.

[Using keyword instead of tracking bug for HipHop issues as requested in bug 40926 comment 5. Filter bugmail on this message.]

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:25 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM