Skip to content
Snippets Groups Projects
Commit 1c764a35 authored by catch's avatar catch
Browse files

Issue #3465827 by andypost, kim.pepper, arunkumark, catch, berdir, quietone:...

Issue #3465827 by andypost, kim.pepper, arunkumark, catch, berdir, quietone: Stop passing E_USER_ERROR to trigger_error() on PHP 8.4

(cherry picked from commit 1bf85911)
parent a8fd59d2
Branches
Tags
24 merge requests!12227Issue #3181946 by jonmcl, mglaman,!12079Issue #3523476 by matthiasm11: Add empty check on operator,!12024Fix: DocBlock comment for return value of Drupal\Core\Database\Connection::transactionManager(),!11974Draft: Issue #3495165 by catch, joeyroth, berdir, texas-bronius: Better warning...,!11934Issue #3520997: DefaultLazyPluginCollection unnecessarily instantiates plugins when sorting collection,!11887Issue #3520065: The migrate Row class API is incomplete,!11636Draft: Issue #3515643 by macsim: fieldNameExists method is inconsistent,!11515Issue #3480419 by mondrake, smustgrave, catch: Method...,!11380Issue #3490698 by catch, spokje: Bump MINIMUM_STABILITY back to 'stable' when...,!11281Use Drupal Core Leadership terminology in MAINTAINERS.txt,!11239Issue #3507548: Allow workspace changes listing to show all items, without a pager,!11238Fix issue #3051797,!11213Issue #3506743 by tomislav.matokovic: Increasing the color contrast for the navigation block title against the background of the navigation sidebar to at least 4.5:1,!11147Draft: Try to avoid manually setting required cache contexts,!11108Issue #3490298 by nicxvan: Profiles can be missed in OOP hooks,!11093Drupal on MongoDB 11.1.x,!11017Issue #3502540: Add date filter for moderated content.,!11009Issue #3486972 migrate feed icon,!10999Cleaning up Taxonomy hooks and updating baseline.,!10977Issue #3501457: Fix path used in a A11y Test Admin,!10881Issue #3489329 by mfb, casey: symfony/http-foundation commit 32310ff breaks PathValidator,!10570Issue #3494197: Convert Twig engine hooks,!10567Issue #3494154: Index is not added if entity doesn't support revisions,!10548Revert "Issue #3478621 by catch, longwave, nicxvan: Add filecache to OOP hook attribute parsing"
Pipeline #354098 canceled
Pipeline: drupal

#354100

    ......@@ -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();
    ......
    ......@@ -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.
    ......
    ......@@ -381,7 +381,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;
    }
    }
    ......@@ -417,7 +417,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;
    }
    }
    ......@@ -615,7 +615,7 @@ protected function sendPlaceholders(array $placeholders, array $placeholder_orde
    throw $e;
    }
    else {
    trigger_error($e, E_USER_ERROR);
    trigger_error($e, E_USER_WARNING);
    }
    }
    }
    ......
    ......@@ -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
    ......
    ......@@ -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 .*MockObject_TranslatableMarkup_.* object in .*TranslatableMarkupTest.php on line [0-9]+: Yes you may./', $this->lastErrorMessage);
    }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment