← All changes
|
jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php
+2
-2
13.3.3
→
16.3-beta
View file →
| @@ -89,8 +89,10 @@ | ||
| 89 | 89 | |
| 90 | 90 | // Raw query so we can avoid races: add_option will also update. |
| 91 | 91 | $show_errors = $this->db->hide_errors(); |
| 92 | 92 | |
| 93 | + $return = false; | |
| 94 | + | |
| 93 | 95 | // Running `try...finally` to make sure that we re-enable errors in case of an exception. |
| 94 | 96 | try { |
| 95 | 97 | $old_nonce = $this->db->get_row( |
| 96 | 98 | $this->db->prepare( "SELECT 1 FROM `{$this->db->options}` WHERE option_name = %s", "jetpack_nonce_{$timestamp}_{$nonce}" ) |
| @@ -104,10 +106,8 @@ | ||
| 104 | 106 | time(), |
| 105 | 107 | 'no' |
| 106 | 108 | ) |
| 107 | 109 | ); |
| 108 | - } else { | |
| 109 | - $return = false; | |
| 110 | 110 | } |
| 111 | 111 | } finally { |
| 112 | 112 | $this->db->show_errors( $show_errors ); |
| 113 | 113 | } |