diff --git a/postmark.php b/postmark.php index 91353da..ddab06b 100644 --- a/postmark.php +++ b/postmark.php @@ -291,7 +291,7 @@ public function save_settings() { } // We validate that 'api_key' contains only allowed caracters [letters, numbers, dash]. - if ( isset( $data['api_key'] ) && ( 1 === preg_match( '/^[A-Za-z0-9\-]*$/', $data['api_key'] || 'POSTMARK_API_TEST' === $data['api_key'] ) ) ) { + if ( isset( $data['api_key'] ) && ( 1 === preg_match( '/^[A-Za-z0-9\-]*$/', $data['api_key'] ) || 'POSTMARK_API_TEST' === $data['api_key'] ) ) { $settings['api_key'] = $data['api_key']; } else { $settings['api_key'] = '';