Skip to content

Commit aed0918

Browse files
Copilotswissspidy
andcommitted
Remove error suppression operator - keep warnings visible
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent a5c12f4 commit aed0918

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/WP_CLI/Shell/REPL.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function start() {
3030
if ( self::starts_with( self::non_expressions(), $__repl_input_line ) ) {
3131
ob_start();
3232
try {
33-
// phpcs:ignore Squiz.PHP.Eval.Discouraged,WordPress.PHP.NoSilencedErrors.Discouraged -- This is meant to be a REPL, no way to avoid eval. Suppress PHP warnings to show clean error messages.
34-
@eval( $__repl_input_line );
33+
// phpcs:ignore Squiz.PHP.Eval.Discouraged -- This is meant to be a REPL, no way to avoid eval.
34+
eval( $__repl_input_line );
3535
} catch ( \Throwable $e ) {
3636
// Display the error message but continue the session
3737
fwrite( STDERR, get_class( $e ) . ': ' . $e->getMessage() . "\n" );
@@ -49,8 +49,8 @@ public function start() {
4949
// Write directly to STDOUT, to sidestep any output buffers created by plugins
5050
ob_start();
5151
try {
52-
// phpcs:ignore Squiz.PHP.Eval.Discouraged,WordPress.PHP.NoSilencedErrors.Discouraged -- This is meant to be a REPL, no way to avoid eval. Suppress PHP warnings to show clean error messages.
53-
$__repl_eval_result = @eval( $__repl_input_line );
52+
// phpcs:ignore Squiz.PHP.Eval.Discouraged -- This is meant to be a REPL, no way to avoid eval.
53+
$__repl_eval_result = eval( $__repl_input_line );
5454
} catch ( \Throwable $e ) {
5555
// Display the error message but continue the session
5656
fwrite( STDERR, get_class( $e ) . ': ' . $e->getMessage() . "\n" );

0 commit comments

Comments
 (0)