diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-09-10 20:51:42 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-09-10 20:51:42 +0200 |
commit | 24bef50ab259b9215b933944a2cf2764b5d7a100 (patch) | |
tree | 9e51b0f588b0b60c33b4854f6f3cbbd207b8c1ba | |
parent | 3ff1877001eb606d1263bffa72b9d12887c7f4f9 (diff) | |
download | weechat-24bef50ab259b9215b933944a2cf2764b5d7a100.zip |
php: fix function plugin_get_name
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index c79a1fef5..ed368f307 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -229,13 +229,17 @@ weechat_php_cb_err: API_FUNC(plugin_get_name) { + zend_string *z_plugin; + struct t_weechat_plugin *plugin; const char *retval; API_INIT_FUNC(1, "plugin_get_name", API_RETURN_EMPTY); - if (zend_parse_parameters_none () == FAILURE) + if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_plugin) == FAILURE) API_WRONG_ARGS(API_RETURN_EMPTY); - retval = weechat_plugin_get_name (weechat_php_plugin); + plugin = API_STR2PTR(ZSTR_VAL(z_plugin)); + + retval = weechat_plugin_get_name (plugin); API_RETURN_STRING(retval); } |