Skip to content

Commit 5fadb29

Browse files
remicolletbd808
authored andcommitted
Fix #65 yaml_parse_url method not working
1 parent 6acc5c8 commit 5fadb29

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

yaml.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ PHP_FUNCTION(yaml_parse_url)
476476

477477
php_stream *stream = { 0 };
478478
zend_string *input;
479-
size_t size = 0;
480479

481480
parser_state_t state;
482481
zval yaml;
@@ -516,7 +515,7 @@ PHP_FUNCTION(yaml_parse_url)
516515
}
517516

518517
yaml_parser_initialize(&state.parser);
519-
yaml_parser_set_input_string(&state.parser, (unsigned char *)input, size);
518+
yaml_parser_set_input_string(&state.parser, (unsigned char *)ZSTR_VAL(input), ZSTR_LEN(input));
520519

521520
if (pos < 0) {
522521
php_yaml_read_all(&state, &ndocs, &yaml);

0 commit comments

Comments
 (0)