Commit 6b006e9
committed
Compat: Replace warning-suppression in _wp_can_use_pcre_u()
This patch replaces the use of the problematic error-suppresssion operator with a specific error-handler to catch and report Unicode PCRE support without raising the related issues of error-suppression: notably conflating errors and failing to prevent completely the logging of the warnings.
In this case, the WPCS rule against using error-suppression was actually helpful in pointing out the risk, but the code was left in place with an “ignore” comment to silence the violation; this patch addresses the risk and removes the need for the comment.
Developed in #9576
Discussed in https://core.trac.wordpress.org/ticket/63865
Follow-up to: [45611].
Props dmsnell.
Fixes #63865.
git-svn-id: https://develop.svn.wordpress.org/trunk@60694 602fd350-edb4-49c9-b593-d223f7449a821 parent da59c19 commit 6b006e9
1 file changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
53 | 73 | | |
54 | 74 | | |
55 | 75 | | |
| |||
0 commit comments