Commits

Remi Collet committed 591006e

dont display "0.0" for unkown header version

  • Participants
  • Parent commits aa17942
  • Branches issue-030

Comments (0)

Files changed (1)

 
 	irc_get_version(&high, &low);
 	spprintf(&version[1], 0, "%u.%u", high, low);
+#if PHP_IPHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH
 	spprintf(&version[0], 0, "%u.%u", PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH, PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW);
-
+#else
+	/* version <= 1.6 doesn't exposed its version */
+	spprintf(&version[0], 0, "-");
+#endif
 	php_info_print_table_start();
 	php_info_print_table_header(2, "IRC client support", "enabled");
 	php_info_print_table_row(2, "Version", PHP_IRCCLIENT_VERSION);