Issue #3177557 by alexpott, andypost, dawehner: \Drupal\error_test\Controller\ErrorTestController::generateWarnings() notice is not a notice in PHP 8

merge-requests/25/head
xjm 2020-10-26 12:54:47 -05:00
parent 20e0758ae8
commit d678245f37
2 changed files with 3 additions and 3 deletions

View File

@ -44,8 +44,8 @@ class ErrorTestController extends ControllerBase {
// Tell Drupal error reporter to send errors to Simpletest or not.
define('SIMPLETEST_COLLECT_ERRORS', $collect_errors);
// This will generate a notice.
$bananas = [];
$monkey_love = $bananas[1];
$notice = new \stdClass();
$notice == 1 ? 1 : 0;
// This will generate a warning.
$obj = new \stdClass();
$obj->p =& $obj;

View File

@ -31,7 +31,7 @@ class ErrorHandlerTest extends BrowserTestBase {
$config = $this->config('system.logging');
$error_notice = [
'%type' => 'Notice',
'@message' => 'Undefined offset: 1',
'@message' => 'Object of class stdClass could not be converted to int',
'%function' => 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()',
'%file' => drupal_get_path('module', 'error_test') . '/error_test.module',
];