File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ abstract class AbstractComplexType
31
31
/**
32
32
* Constructor
33
33
*
34
- * @param array $options Data as key => value array
34
+ * @param array|null $options Data as key => value array
35
35
*/
36
36
public function __construct (array $ options = null )
37
37
{
@@ -75,11 +75,13 @@ public function &__get($name)
75
75
if ($ reflectionClass ->hasMethod ($ setterMethodName )) {
76
76
$ reflectionNamedType = $ reflectionClass ->getMethod ($ setterMethodName )->getParameters ()[0 ]->getType ();
77
77
/* @var $reflectionNamedType ReflectionNamedType */
78
- $ parameterClassName = $ reflectionNamedType ->getName ();
78
+ if ($ reflectionNamedType !== NULL ) {
79
+ $ parameterClassName = $ reflectionNamedType ->getName ();
79
80
80
- if (class_exists ($ parameterClassName )) {
81
- $ this ->$ setterMethodName (new $ parameterClassName );
82
- return $ this ->values [$ name ];
81
+ if (class_exists ($ parameterClassName )) {
82
+ $ this ->$ setterMethodName (new $ parameterClassName );
83
+ return $ this ->values [$ name ];
84
+ }
83
85
}
84
86
}
85
87
You can’t perform that action at this time.
0 commit comments