File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 14
14
use spaf \simputils \exceptions \PropertyAccessError ;
15
15
use spaf \simputils \exceptions \PropertyDoesNotExist ;
16
16
use spaf \simputils \special \PropertiesCacheIndex ;
17
+ use function get_parent_class ;
17
18
use function in_array ;
18
19
19
20
/**
@@ -97,15 +98,26 @@ public function __set($name, $value): void {
97
98
}
98
99
99
100
public function __isset ($ name ) {
100
- return $ this ->____checkSimpUtilsPropertyAvailability ($ name );
101
- }
102
-
103
- private function ____checkSimpUtilsPropertyAvailability ($ name , $ type = Property::TYPE_GET ) {
101
+ $ type = Property::TYPE_GET ;
104
102
$ ref = static ::class.'# ' .$ name .'# ' .$ type ;
105
103
if ($ method_name = PropertiesCacheIndex::$ index [$ ref ] ?? false ) {
106
104
return $ this ->$ method_name (null , $ type , $ name );
107
105
}
108
- return $ this ->____prepareProperty ($ name , $ type , check_and_do_not_call: true );
106
+ $ res = $ this ->____prepareProperty ($ name , $ type , check_and_do_not_call: true );
107
+
108
+ if (!$ res ) {
109
+ try {
110
+ /** @noinspection PhpUndefinedMethodInspection */
111
+ if (get_parent_class ()) {
112
+ $ res = parent ::__isset ($ name );
113
+ }
114
+ } catch (Error $ e ) {
115
+ /** @noinspection PhpUnhandledExceptionInspection */
116
+ throw $ e ;
117
+ }
118
+ }
119
+
120
+ return $ res ;
109
121
}
110
122
111
123
private function ____propertyBatchMethodGet ($ value , $ type , $ name ): mixed {
You can’t perform that action at this time.
0 commit comments