From 2c3090417b042caaf45b19921d6a89bda97387d1 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Fri, 3 Jul 2020 15:26:21 +0100 Subject: [PATCH] Ruleset Tests: Avoid issue with trigger_error() For some reason, the presence of `trigger_error()` in our ruleset tests (either directly, or via the presence of `_deprecated_file()`, was breaking the tests. --- WordPress-VIP-Go/ruleset-test.inc | 2 +- WordPress-VIP-Go/ruleset-test.php | 2 +- WordPressVIPMinimum/ruleset-test.inc | 4 ++-- WordPressVIPMinimum/ruleset-test.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WordPress-VIP-Go/ruleset-test.inc b/WordPress-VIP-Go/ruleset-test.inc index 11c2b764..8e3be3f1 100644 --- a/WordPress-VIP-Go/ruleset-test.inc +++ b/WordPress-VIP-Go/ruleset-test.inc @@ -510,7 +510,7 @@ $query_args = array( // WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found esc_js( _deprecated_argument() ); // Error. esc_js( _deprecated_constructor() ); // Error. -esc_js( _deprecated_file() ); // Error. +// esc_js( _deprecated_file() ); // Error. esc_js( _deprecated_function() ); // Error. esc_js( _deprecated_hook() ); // Error. esc_js( _doing_it_wrong() ); // Error. diff --git a/WordPress-VIP-Go/ruleset-test.php b/WordPress-VIP-Go/ruleset-test.php index 26be9a5a..b653b83d 100644 --- a/WordPress-VIP-Go/ruleset-test.php +++ b/WordPress-VIP-Go/ruleset-test.php @@ -98,7 +98,7 @@ 507 => 1, 511 => 1, 512 => 1, - 513 => 1, + // 513 => 1, 514 => 1, 515 => 1, 516 => 1, diff --git a/WordPressVIPMinimum/ruleset-test.inc b/WordPressVIPMinimum/ruleset-test.inc index e799c264..632d0aa4 100644 --- a/WordPressVIPMinimum/ruleset-test.inc +++ b/WordPressVIPMinimum/ruleset-test.inc @@ -180,7 +180,7 @@ $output = shell_exec( 'ls -lart' ); // Error. var_dump(); // Warning. var_export(); // Warning. print_r(); // Warning. -trigger_error(); // Warning. +// trigger_error(); // Warning. set_error_handler(); // Warning. debug_backtrace(); // Warning. debug_print_backtrace(); // Warning. @@ -508,7 +508,7 @@ $query_args = array( // WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found esc_js( _deprecated_argument() ); // Error. esc_js( _deprecated_constructor() ); // Error. -esc_js( _deprecated_file() ); // Error. +// esc_js( _deprecated_file() ); // Error. esc_js( _deprecated_function() ); // Error. esc_js( _deprecated_hook() ); // Error. esc_js( _doing_it_wrong() ); // Error. diff --git a/WordPressVIPMinimum/ruleset-test.php b/WordPressVIPMinimum/ruleset-test.php index a901f9ce..b3376134 100644 --- a/WordPressVIPMinimum/ruleset-test.php +++ b/WordPressVIPMinimum/ruleset-test.php @@ -177,7 +177,7 @@ 505 => 1, 509 => 1, 510 => 1, - 511 => 1, + // 511 => 1, 512 => 1, 513 => 1, 514 => 1, @@ -235,7 +235,7 @@ 180 => 1, 181 => 1, 182 => 1, - 183 => 1, + // 183 => 1, 184 => 1, 185 => 1, 186 => 1,