Skip to content

Commit d120f76

Browse files
fix(profiling): allow version-dependent ini cast
1 parent 70462ac commit d120f76

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

profiling/src/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,8 @@ unsafe extern "C" fn parse_profiling_enabled(
916916

917917
/// Display the profiling enabled config value
918918
unsafe extern "C" fn display_profiling_enabled(ini_entry: *mut zend_ini_entry, type_: c_int) {
919+
// PHP 8.6 changed this field from u8 to bool, so the cast is redundant only on older PHP.
920+
#[allow(clippy::unnecessary_cast)]
919921
let tmp_value: *mut zend_string =
920922
if type_ as u32 == ZEND_INI_DISPLAY_ORIG && (*ini_entry).modified as u8 != 0 {
921923
if !(*ini_entry).orig_value.is_null() {

0 commit comments

Comments
 (0)