Skip to content

Commit 5962dc4

Browse files
committed
ProperEscapingFunction: make the $escaping_functions property protected
The `public` `$escaping_functions` property was never _intended_ for allowing it to be changed via a custom ruleset. As the array _format_ of the property has now changed, adjusted values for this property set in a custom ruleset will no longer work. This is a breaking change, but as: 1. The property was never intended to be changed from a custom ruleset and 2. The chances of any custom rulesets actually existing which _do_ change this property being very, very small... I believe it is justified to make the breaking change in the format in a minor release as the format change provides a real functional benefit. Now, as this breaking change will be made anyway, we may as well do it right and mark the property as `protected` preventing it from ever being changed via a custom ruleset.
1 parent 9be3a38 commit 5962dc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPressVIPMinimum/Sniffs/Security/ProperEscapingFunctionSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ProperEscapingFunctionSniff extends Sniff {
2323
*
2424
* @var array
2525
*/
26-
public $escaping_functions = [
26+
protected $escaping_functions = [
2727
'esc_url' => 'url',
2828
'esc_attr' => 'attr',
2929
'esc_attr__' => 'attr',

0 commit comments

Comments
 (0)