diff --git a/src/dio.c b/src/dio.c index 0cac05f..51c1308 100644 --- a/src/dio.c +++ b/src/dio.c @@ -92,7 +92,7 @@ PHP_FUNCTION(dio_open) zend_long mode = 0; int fd; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "pl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { RETURN_THROWS(); } diff --git a/src/dio_stream_wrappers.c b/src/dio_stream_wrappers.c index e55c580..ca44d2d 100644 --- a/src/dio_stream_wrappers.c +++ b/src/dio_stream_wrappers.c @@ -198,7 +198,7 @@ PHP_FUNCTION(dio_raw) { char *mode; size_t mode_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|h!", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps|h!", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { RETURN_THROWS(); } @@ -353,7 +353,7 @@ PHP_FUNCTION(dio_serial) { char *mode; size_t mode_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|h!", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps|h!", &filename, &filename_len, &mode, &mode_len, &options) == FAILURE) { RETURN_THROWS(); }