diff --git a/php_uv.c b/php_uv.c index 6301c52..96a6759 100644 --- a/php_uv.c +++ b/php_uv.c @@ -3005,11 +3005,10 @@ PHP_FUNCTION(uv_cwd) char buffer[1024] = {0}; size_t buffer_sz = sizeof(buffer); - /* TODO: check behavior */ uv_cwd(buffer, &buffer_sz); buffer[buffer_sz] = '\0'; - RETURN_STRINGL(buffer, buffer_sz, 1); + RETURN_STRING(buffer, 1); } /* }}} */ diff --git a/tests/999-uv_chdir.phpt b/tests/999-uv_chdir.phpt new file mode 100644 index 0000000..b9641c8 --- /dev/null +++ b/tests/999-uv_chdir.phpt @@ -0,0 +1,15 @@ +--TEST-- +Check for uv_chdir +--FILE-- +