Skip to content

Be paranoid: the test(ed) code might unset _SERVER['REQUEST_TIME']. #753

Description

@williamdes

$buildNode->setBuildTime(\DateTime::createFromFormat('U', (string) $_SERVER['REQUEST_TIME']));

Related to: 6e0037e


  Generating code coverage report in PHPUnit XML format ...
  STDERR:
  PHP Notice:  Undefined index: REQUEST_TIME in vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php on line 71
  PHP Stack trace:
  PHP   1. {main}() vendor/phpunit/phpunit/phpunit:0
  PHP   2. PHPUnit\TextUI\Command::main() vendor/phpunit/phpunit/phpunit:61
  PHP   3. PHPUnit\TextUI\Command->run() vendor/phpunit/phpunit/src/TextUI/Command.php:68
  PHP   4. PHPUnit\TextUI\TestRunner->run() vendor/phpunit/phpunit/src/TextUI/Command.php:108
  PHP   5. SebastianBergmann\CodeCoverage\Report\Xml\Facade->process() vendor/phpunit/phpunit/src/TextUI/TestRunner.php:759
  PHP   6. SebastianBergmann\CodeCoverage\Report\Xml\Facade->setBuildInformation() vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php:60

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions