Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
williamdes opened this issue May 22, 2020 · 1 comment
Closed

Comments

@williamdes
Copy link

$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

@williamdes
Copy link
Author

Note: I was running https://infection.github.io/

williamdes added a commit to phpmyadmin/phpmyadmin that referenced this issue May 22, 2020
sebastianbergmann added a commit that referenced this issue May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants