File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,10 @@ zval *phper_get_this(zend_execute_data *execute_data) {
348348 return getThis ();
349349}
350350
351+ zend_class_entry * phper_get_called_scope (zend_execute_data * execute_data ) {
352+ return zend_get_called_scope (execute_data );
353+ }
354+
351355size_t phper_zend_object_properties_size (zend_class_entry * ce ) {
352356 return zend_object_properties_size (ce );
353357}
Original file line number Diff line number Diff line change 1212
1313use crate :: {
1414 arrays:: { ZArr , ZArray } ,
15+ classes:: ClassEntry ,
1516 errors:: ExpectTypeError ,
1617 functions:: { ZFunc , call_internal} ,
1718 objects:: { StateObject , ZObj , ZObject } ,
@@ -192,10 +193,14 @@ impl ExecuteData {
192193 }
193194
194195 /// Gets associated called scope if it exists
195- pub fn get_called_scope ( & mut self ) -> Option < & ZStr > {
196+ pub fn get_called_scope ( & mut self ) -> Option < & ClassEntry > {
196197 unsafe {
197- let val = ZVal :: from_ptr ( phper_get_called_scope ( & mut self . inner ) ) ;
198- val. as_z_str ( )
198+ let ptr = phper_get_called_scope ( & mut self . inner ) ;
199+ if ptr. is_null ( ) {
200+ None
201+ } else {
202+ Some ( ClassEntry :: from_ptr ( ptr) )
203+ }
199204 }
200205 }
201206
You can’t perform that action at this time.
0 commit comments