| @@ -351,9 +351,9 @@ | ||
| 351 | 351 | * @param string $message |
| 352 | 352 | * @return array |
| 353 | 353 | */ |
| 354 | 354 | public function encrypt( $message ) { |
| 355 | - if ( is_null( $message ) ) { | |
| 355 | + if ( is_null( $message ) || ! defined( 'AUTH_KEY' ) ) { | |
| 356 | 356 | return [ |
| 357 | 357 | 'cipher' => $message, |
| 358 | 358 | 'nonce' => '' |
| 359 | 359 | ]; |
| @@ -399,9 +399,9 @@ | ||
| 399 | 399 | public function decrypt( $cipher, $nonce ) { |
| 400 | 400 | $enc_type = $this->get_enc_type(); |
| 401 | 401 | |
| 402 | 402 | // If we received an empty nonce, we assume it was never properly encrypted to begin with. |
| 403 | - if ( $nonce == '' ) { | |
| 403 | + if ( $nonce == '' || ! defined( 'AUTH_KEY' ) ) { | |
| 404 | 404 | return $cipher; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | try { |