Skip to content

Commit

Permalink
Add phpcs:ignore for error handler workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgeatches committed Jun 9, 2023
1 parent 09ed42e commit f1a0354
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/rest/test-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ private function convert_next_error_to_exception() {
// This method is now deprecated. Use this workaround to convert the next error
// to an exception, which can be matched with expectExceptionMessage().

// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler -- Used for catching errors in tests.
set_error_handler(
static function ( int $errno, string $errstr ): never {
restore_error_handler();
Expand Down

0 comments on commit f1a0354

Please sign in to comment.