From 7483c2a311c92799ac7564b8312768cc8ddeb278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 28 Sep 2017 00:28:32 +0200 Subject: [PATCH] php: fix condition on PHP version to support future PHP versions (>= 8.0) --- src/plugins/php/weechat-php.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index 8a734799e..8dd3a3d45 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -1089,18 +1089,21 @@ php_weechat_sapi_error (int type, const char *format, ...) free (vbuffer); } +#if PHP_MAJOR_VERSION > 7 || PHP_MINOR_VERSION >= 1 void -#if PHP_MINOR_VERSION >= 1 php_weechat_log_message (char *message, int syslog_type_int) -#else -php_weechat_log_message (char *message) -#endif { -#if PHP_MINOR_VERSION >= 1 - (void)syslog_type_int; -#endif + (void) syslog_type_int; + php_weechat_ub_write (message, strlen (message)); } +#else +void +php_weechat_log_message (char *message) +{ + php_weechat_ub_write (message, strlen (message)); +} +#endif /* * Initializes PHP plugin.