Skip to content

Commit aaa01b2

Browse files
committed
Apply suggestions from PR review
- Change standard descriptions to be more direct. - Remove function lists from standard descriptions. - Fix "(Not)" in titles to "Not using...". - Make titles and comments more generic. - Fix typo `php_info()` to `phpinfo()`. - Use "full path disclosure" consistently.
1 parent 9a4c319 commit aaa01b2

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

WordPress/Docs/PHP/DevelopmentFunctionsStandard.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,33 @@
55
>
66
<standard>
77
<![CDATA[
8-
Debug code should not normally be used in production.
9-
10-
Typically, this rule verifies if function calls to the PHP native `error_log()`, `var_dump()`, `var_export()`, `print_r()`, `trigger_error()`, `set_error_handler()`, `debug_backtrace`, `debug_print_backtrace` and `wp_debug_backtrace_summary()` functions are present in the code.
8+
Debug functions should not be used in production code.
119
]]>
1210
</standard>
1311
<code_comparison>
14-
<code title="Valid: (Not) using var_dump().">
12+
<code title="Valid: Not using debug functions.">
1513
<![CDATA[
16-
// var_dump() should not be used.
14+
// Code without debug functions.
1715
]]>
1816
</code>
19-
<code title="Invalid: Calling the PHP native `var_dump()` function.">
17+
<code title="Invalid: Calling a debug function.">
2018
<![CDATA[
2119
<em>var_dump( $bar );</em>
2220
]]>
2321
</code>
2422
</code_comparison>
2523
<standard>
2624
<![CDATA[
27-
Please refrain from using functions that can lead to full path disclosure.
28-
29-
Typically, this rule verifies if function calls to the PHP native `error_reporting()` and `phpinfo()` functions are present in the code.
25+
Functions that can lead to full path disclosure should not be used.
3026
]]>
3127
</standard>
3228
<code_comparison>
33-
<code title="Valid: (Not) using `phpinfo()`.">
29+
<code title="Valid: Not using functions that can lead to full path disclosure.">
3430
<![CDATA[
35-
// php_info() should not be used.
31+
// No full path disclosure functions.
3632
]]>
3733
</code>
38-
<code title="Invalid: Calling the PHP native `phpinfo()` function.">
34+
<code title="Invalid: Using a function that can lead to full path disclosure.">
3935
<![CDATA[
4036
<em>phpinfo();</em>
4137
]]>

0 commit comments

Comments
 (0)