@@ -60,7 +60,7 @@ public function readExtendedMetadata($meta, array &$config)
6060 if (!$ this ->isValidField ($ meta , $ field )) {
6161 throw new InvalidMappingException ("Field - [ {$ field }] type is not valid and must be 'string' or a reference in class - {$ meta ->getName ()}" );
6262 }
63- if (!$ this ->_isAttributeSet ($ data , 'on ' ) || !in_array ($ this ->_getAttribute ($ data , 'on ' ), ['update ' , 'create ' , 'change ' ])) {
63+ if (!$ this ->_isAttributeSet ($ data , 'on ' ) || !in_array ($ this ->_getAttribute ($ data , 'on ' ), ['update ' , 'create ' , 'change ' ], true )) {
6464 throw new InvalidMappingException ("Field - [ {$ field }] trigger 'on' is not one of [update, create, change] in class - {$ meta ->getName ()}" );
6565 }
6666
@@ -93,7 +93,7 @@ public function readExtendedMetadata($meta, array &$config)
9393 if (!$ meta ->isSingleValuedAssociation ($ field )) {
9494 throw new InvalidMappingException ("Association - [ {$ field }] is not valid, it must be a one-to-many relation or a string field - {$ meta ->getName ()}" );
9595 }
96- if (!$ this ->_isAttributeSet ($ data , 'on ' ) || !in_array ($ this ->_getAttribute ($ data , 'on ' ), ['update ' , 'create ' , 'change ' ])) {
96+ if (!$ this ->_isAttributeSet ($ data , 'on ' ) || !in_array ($ this ->_getAttribute ($ data , 'on ' ), ['update ' , 'create ' , 'change ' ], true )) {
9797 throw new InvalidMappingException ("Field - [ {$ field }] trigger 'on' is not one of [update, create, change] in class - {$ meta ->getName ()}" );
9898 }
9999
@@ -130,6 +130,6 @@ protected function isValidField($meta, $field)
130130 {
131131 $ mapping = $ meta ->getFieldMapping ($ field );
132132
133- return $ mapping && in_array ($ mapping ['type ' ], $ this ->validTypes );
133+ return $ mapping && in_array ($ mapping ['type ' ], $ this ->validTypes , true );
134134 }
135135}
0 commit comments