1 | <?php |
||
13 | class Jetpack_WPCOM_Block_Editor { |
||
14 | /** |
||
15 | * ID of the user who signed the nonce. |
||
16 | * |
||
17 | * @var int |
||
18 | */ |
||
19 | private $nonce_user_id; |
||
20 | |||
21 | /** |
||
22 | * Singleton |
||
23 | */ |
||
24 | public static function init() { |
||
33 | |||
34 | /** |
||
35 | * Jetpack_WPCOM_Block_Editor constructor. |
||
36 | */ |
||
37 | private function __construct() { |
||
41 | |||
42 | /** |
||
43 | * Prevents frame options header from firing if this is a whitelisted iframe request. |
||
44 | */ |
||
45 | public function disable_send_frame_options_header() { |
||
50 | |||
51 | /** |
||
52 | * Adds custom admin body class if this is a whitelisted iframe request. |
||
53 | * |
||
54 | * @param string $classes Admin body classes. |
||
55 | * @return string |
||
56 | */ |
||
57 | public function add_iframed_body_class( $classes ) { |
||
64 | |||
65 | /** |
||
66 | * Checks whether this is a whitelisted iframe request. |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function framing_allowed() { |
||
90 | |||
91 | /** |
||
92 | * Verify that correct nonce was used with time limit. |
||
93 | * |
||
94 | * The user is given an amount of time to use the token, so therefore, since the |
||
95 | * UID and $action remain the same, the independent variable is the time. |
||
96 | * |
||
97 | * @param string $nonce Nonce that was used in the form to verify. |
||
98 | * @param string $action Should give context to what is taking place and be the same when nonce was created. |
||
99 | * @return boolean|WP_Error Whether the nonce is valid. |
||
100 | */ |
||
101 | public function verify_frame_nonce( $nonce, $action ) { |
||
146 | |||
147 | /** |
||
148 | * Filters the WordPress salt. |
||
149 | * |
||
150 | * @param string $salt Salt for the given scheme. |
||
151 | * @param string $scheme Authentication scheme. |
||
152 | * @return string |
||
153 | */ |
||
154 | public function filter_salt( $salt, $scheme ) { |
||
165 | } |
||
166 | |||
168 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: