We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c98bf49 commit 196ddb3Copy full SHA for 196ddb3
src/php/types/zval.rs
@@ -137,9 +137,9 @@ impl<'a> Zval {
137
}
138
139
/// Returns the value of the zval if it is a reference.
140
- pub fn reference(&self) -> Option<Zval> {
+ pub fn reference(&self) -> Option<&mut Zval> {
141
if self.is_reference() {
142
- Some(unsafe { (*self.value.ref_).val })
+ Some(&mut unsafe { self.value.ref_.as_mut() }?.val)
143
} else {
144
None
145
0 commit comments