diff --git a/core/lib/Drupal/Component/Diff/Diff.php b/core/lib/Drupal/Component/Diff/Diff.php index 1b5c40a70514f7a724784875decb087d71a24c8d..c32be854912bd49ee7ccd67f217008e13858c06c 100644 --- a/core/lib/Drupal/Component/Diff/Diff.php +++ b/core/lib/Drupal/Component/Diff/Diff.php @@ -168,24 +168,24 @@ public function closing() { public function check($from_lines, $to_lines) { @trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3337942', E_USER_DEPRECATED); if (serialize($from_lines) != serialize($this->orig())) { - trigger_error("Reconstructed original doesn't match", E_USER_ERROR); + trigger_error("Reconstructed original doesn't match", E_USER_WARNING); } if (serialize($to_lines) != serialize($this->closing())) { - trigger_error("Reconstructed closing doesn't match", E_USER_ERROR); + trigger_error("Reconstructed closing doesn't match", E_USER_WARNING); } $rev = $this->reverse(); if (serialize($to_lines) != serialize($rev->orig())) { - trigger_error("Reversed original doesn't match", E_USER_ERROR); + trigger_error("Reversed original doesn't match", E_USER_WARNING); } if (serialize($from_lines) != serialize($rev->closing())) { - trigger_error("Reversed closing doesn't match", E_USER_ERROR); + trigger_error("Reversed closing doesn't match", E_USER_WARNING); } $prevtype = 'none'; foreach ($this->edits as $edit) { if ( $prevtype == $edit->type ) { - trigger_error("Edit sequence is non-optimal", E_USER_ERROR); + trigger_error("Edit sequence is non-optimal", E_USER_WARNING); } $prevtype = $edit->type; } diff --git a/core/lib/Drupal/Component/Diff/DiffFormatter.php b/core/lib/Drupal/Component/Diff/DiffFormatter.php index d70f3e61ad35f96ed6a0efd84f90267b7a812b52..87578b38526400ad5ff722a18013150f5ee359e7 100644 --- a/core/lib/Drupal/Component/Diff/DiffFormatter.php +++ b/core/lib/Drupal/Component/Diff/DiffFormatter.php @@ -134,7 +134,7 @@ protected function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) { $this->_changed($edit->orig, $edit->closing); } else { - trigger_error('Unknown edit type', E_USER_ERROR); + trigger_error('Unknown edit type', E_USER_WARNING); } } $this->_end_block(); diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php index 735669dc147cb6cc82ef04706887e66cb4be3915..64d1e7b952aeed6035203a35d53e8202fbb946d6 100644 --- a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php +++ b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php @@ -20,7 +20,7 @@ class DiffOp { */ public function reverse() { @trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3337942', E_USER_DEPRECATED); - trigger_error('pure virtual', E_USER_ERROR); + trigger_error('pure virtual', E_USER_WARNING); } /** diff --git a/core/lib/Drupal/Component/Utility/ToStringTrait.php b/core/lib/Drupal/Component/Utility/ToStringTrait.php index 2a77c7b53dfa0be937fb369fdd0e2c627c4aa7cb..6829954f4ebfdc2685e3f24a54bbac3c62273ed1 100644 --- a/core/lib/Drupal/Component/Utility/ToStringTrait.php +++ b/core/lib/Drupal/Component/Utility/ToStringTrait.php @@ -17,7 +17,7 @@ public function __toString() { catch (\Exception $e) { // User errors in __toString() methods are considered fatal in the Drupal // error handler. - trigger_error(get_class($e) . ' thrown while calling __toString on a ' . static::class . ' object in ' . $e->getFile() . ' on line ' . $e->getLine() . ': ' . $e->getMessage(), E_USER_ERROR); + trigger_error(get_class($e) . ' thrown while calling __toString on a ' . static::class . ' object in ' . $e->getFile() . ' on line ' . $e->getLine() . ': ' . $e->getMessage(), E_USER_WARNING); // In case we are using another error handler that did not fatal on the // E_USER_ERROR, we terminate execution. However, for test purposes allow // a return value. diff --git a/core/lib/Drupal/Core/Database/Query/Condition.php b/core/lib/Drupal/Core/Database/Query/Condition.php index 8f48910ebc22f7529d4c6b9e12c8293c6d3de920..b2ca13acd734d3aa79efdaa54cc294c7ceedcb3e 100644 --- a/core/lib/Drupal/Core/Database/Query/Condition.php +++ b/core/lib/Drupal/Core/Database/Query/Condition.php @@ -265,7 +265,7 @@ public function compile(Connection $connection, PlaceholderInterface $queryPlace // your site is broken. // On top of that the database API relies on __toString() which // does not allow to throw exceptions. - trigger_error('Invalid characters in query operator: ' . $condition['operator'], E_USER_ERROR); + trigger_error('Invalid characters in query operator: ' . $condition['operator'], E_USER_WARNING); return; } diff --git a/core/modules/big_pipe/src/Render/BigPipe.php b/core/modules/big_pipe/src/Render/BigPipe.php index 1f2ae1807c060324f391f0db0040d68b6d33173c..8f0144c6280f69c8e9c2ddd454e7bf60cd06c341 100644 --- a/core/modules/big_pipe/src/Render/BigPipe.php +++ b/core/modules/big_pipe/src/Render/BigPipe.php @@ -416,7 +416,7 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse throw $e; } else { - trigger_error($e, E_USER_ERROR); + trigger_error($e, E_USER_WARNING); continue; } } @@ -452,7 +452,7 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse throw $e; } else { - trigger_error($e, E_USER_ERROR); + trigger_error($e, E_USER_WARNING); continue; } } @@ -603,7 +603,7 @@ protected function sendPlaceholders(array $placeholders, array $placeholder_orde throw $e; } else { - trigger_error($e, E_USER_ERROR); + trigger_error($e, E_USER_WARNING); } } } diff --git a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php index c319835d2477e2ce1ee16ecc4f3983d39f910149..0cf2631531c72b205833d6dee0bdc7373477e5b2 100644 --- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php +++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php @@ -195,9 +195,9 @@ public function testBigPipe(): void { // database drivers the ability to insert their own limit and offset // functionality. $records = $connection->select('watchdog', 'w')->fields('w')->orderBy('wid', 'DESC')->range(0, 2)->execute()->fetchAll(); - $this->assertEquals(RfcLogLevel::ERROR, $records[0]->severity); + $this->assertEquals(RfcLogLevel::WARNING, $records[0]->severity); $this->assertStringContainsString('Oh noes!', (string) unserialize($records[0]->variables)['@message']); - $this->assertEquals(RfcLogLevel::ERROR, $records[1]->severity); + $this->assertEquals(RfcLogLevel::WARNING, $records[1]->severity); $this->assertStringContainsString('You are not allowed to say llamas are not cool!', (string) unserialize($records[1]->variables)['@message']); // Verify that 4xx responses work fine. (4xx responses are handled by diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php index dad1cbe102fa3a869b6382c165db8a3899064e36..899e22e288fb27999d838b2e9443de879db9a4a4 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php @@ -79,7 +79,7 @@ public function testToString(): void { (string) $text; restore_error_handler(); - $this->assertEquals(E_USER_ERROR, $this->lastErrorNumber); + $this->assertEquals(E_USER_WARNING, $this->lastErrorNumber); $this->assertMatchesRegularExpression('/Exception thrown while calling __toString on a .*Mock_TranslatableMarkup_.* object in .*TranslatableMarkupTest.php on line [0-9]+: Yes you may./', $this->lastErrorMessage); }