Skip to content

Commit

Permalink
make compatible with PHP7
Browse files Browse the repository at this point in the history
  • Loading branch information
realFlowControl committed Dec 22, 2023
1 parent e265aa1 commit bb6bba4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions profiling/src/exception.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ impl ExceptionProfilingStats {
#[cfg(php8)]
let exception_name = unsafe { (*exception).class_name() };

#[cfg(php7)]
let message = unsafe {
zend::zai_str_from_zstr(zend::zai_exception_message((*exception).value.obj).as_mut())
.into_string()
};
#[cfg(php8)]
let message = unsafe {
zend::zai_str_from_zstr(zend::zai_exception_message(exception).as_mut()).into_string()
};
Expand Down

0 comments on commit bb6bba4

Please sign in to comment.