bug80781.phpt 635 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Bug #80781: Error handler that throws ErrorException infinite loop
  3. --FILE--
  4. <?php
  5. function handle(int $severity, string $message, string $file, int $line): bool {
  6. if((error_reporting() & $severity) !== 0) {
  7. throw new \ErrorException($message, 0, $severity, $file, $line);
  8. }
  9. return true; // stfu operator
  10. }
  11. set_error_handler('handle');
  12. function getPlugin(string $plugin) : bool{
  13. return false;
  14. }
  15. $data = [];
  16. $array = [];
  17. if (isset($array[$data]) or getPlugin($data)) {
  18. }
  19. ?>
  20. --EXPECTF--
  21. Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in %s:%d
  22. Stack trace:
  23. #0 {main}
  24. thrown in %s on line %d