Skip to content

Commit fab315a

Browse files
committed
PHP 8.6: ZSTR_INIT_LITERAL() no longer takes non-literals, so use zend_string_init()
1 parent 3ab4668 commit fab315a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/profiler/profiler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void xdebug_profiler_add_function_details_user(function_stack_entry *fse, zend_o
354354
} else {
355355
fse->profiler.filename = zend_string_copy(fse->filename);
356356
}
357-
fse->profiler.function = ZSTR_INIT_LITERAL(tmp_name, false);
357+
fse->profiler.function = zend_string_init(tmp_name, strlen(tmp_name), false);
358358
xdfree(tmp_name);
359359
}
360360

@@ -383,7 +383,7 @@ void xdebug_profiler_add_function_details_internal(function_stack_entry *fse)
383383
}
384384

385385
fse->profiler.filename = zend_string_copy(fse->filename);
386-
fse->profiler.function = ZSTR_INIT_LITERAL(tmp_name, false);
386+
fse->profiler.function = zend_string_init(tmp_name, strlen(tmp_name), false);
387387

388388
xdfree(tmp_name);
389389
}

0 commit comments

Comments
 (0)