diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php
index 94f7eaad1..30f82be62 100644
--- a/src/Composer/Command/DiagnoseCommand.php
+++ b/src/Composer/Command/DiagnoseCommand.php
@@ -172,9 +172,7 @@ EOT
$io->write(sprintf('PHP binary path: %s', PHP_BINARY));
}
- if (defined('OPENSSL_VERSION_TEXT') {
- $io->write(sprintf('OpenSSL version: %s', OPENSSL_VERSION_TEXT));
- }
+ $io->write('OpenSSL version: ' . (defined('OPENSSL_VERSION_TEXT') ? ''.OPENSSL_VERSION_TEXT.'' : 'missing'));
return $this->exitCode;
}