Skip to content

Commit ea78389

Browse files
committed
Merge branch 'xdebug_3_4'
2 parents a3fdcbf + 796a6b8 commit ea78389

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/coverage/code_coverage.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -722,19 +722,19 @@ void xdebug_code_coverage_end_of_function(zend_op_array *op_array, zend_string *
722722
xdebug_str str = XDEBUG_STR_INITIALIZER;
723723
xdebug_path *path = xdebug_path_info_get_path_for_level(XG_COV(paths_stack), XDEBUG_VECTOR_COUNT(XG_BASE(stack)));
724724

725-
if (!path || !path->elements) {
725+
if (!path) {
726726
return;
727727
}
728728

729-
xdebug_create_key_for_path(path, &str);
729+
if (path->elements) {
730+
xdebug_create_key_for_path(path, &str);
730731

731-
xdebug_branch_info_mark_end_of_function_reached(filename, function_name, str.d, str.l);
732+
xdebug_branch_info_mark_end_of_function_reached(filename, function_name, str.d, str.l);
732733

733-
xdfree(str.d);
734-
735-
if (path) {
736-
xdebug_path_free(path);
734+
xdfree(str.d);
737735
}
736+
737+
xdebug_path_free(path);
738738
}
739739

740740
PHP_FUNCTION(xdebug_start_code_coverage)

0 commit comments

Comments
 (0)