Skip to content

Commit aa088cb

Browse files
committed
use Z_PARAM_PATH
1 parent 96ea59b commit aa088cb

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

ext/standard/basic_functions.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,14 +739,9 @@ PHP_FUNCTION(putenv)
739739
#endif
740740

741741
ZEND_PARSE_PARAMETERS_START(1, 1)
742-
Z_PARAM_STRING(setting, setting_len)
742+
Z_PARAM_PATH(setting, setting_len)
743743
ZEND_PARSE_PARAMETERS_END();
744744

745-
if (UNEXPECTED(zend_char_has_nul_byte(setting, setting_len))) {
746-
zend_argument_value_error(1, "must not contain any null bytes");
747-
RETURN_THROWS();
748-
}
749-
750745
if (setting_len == 0 || setting[0] == '=') {
751746
zend_argument_value_error(1, "must have a valid syntax");
752747
RETURN_THROWS();

0 commit comments

Comments
 (0)