Commit 9557448a authored by catch's avatar catch
Browse files

Issue #3174158 by anmolgoyal74, alexpott, andypost: Division by zero is not...

Issue #3174158 by anmolgoyal74, alexpott, andypost: Division by zero is not warning since PHP 8.0 beta4
parent 5c44bc37
Loading
Loading
Loading
Loading
+3 −1
Changes for core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -47,7 +47,9 @@ public function generateWarnings($collect_errors = FALSE) {
    $bananas = [];
    $monkey_love = $bananas[1];
    // This will generate a warning.
    $awesomely_big = 1 / 0;
    $obj = new \stdClass();
    $obj->p =& $obj;
    var_export($obj, TRUE);
    // This will generate a user error. Use & to check for double escaping.
    trigger_error("Drupal & awesome", E_USER_WARNING);
    return [];
+1 −1
Changes for core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public function testErrorHandler() {
    ];
    $error_warning = [
      '%type' => 'Warning',
      '@message' => 'Division by zero',
      '@message' => 'var_export does not handle circular references',
      '%function' => 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()',
      '%file' => drupal_get_path('module', 'error_test') . '/error_test.module',
    ];
+1 −1
Changes for core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ public function testUncaughtException() {
  public function testUncaughtFatalError() {
    $fatal_error = [
      '%type' => 'TypeError',
      '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 63',
      '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 65',
      '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()',
    ];
    $this->drupalGet('error-test/generate-fatals');