@@ -178,11 +178,11 @@ public function link(RecordInterface $record, array $pivotData = []): self
178
178
//Ensure reference
179
179
$ record = $ this ->matchOne ($ record ) ?? $ record ;
180
180
181
- if (in_array ($ record , $ this ->instances )) {
181
+ if (in_array ($ record , $ this ->instances , true )) {
182
182
//Merging pivot data
183
183
$ this ->pivotData ->offsetSet ($ record , $ pivotData + $ this ->getPivot ($ record ));
184
184
185
- if (!in_array ($ record , $ this ->updated ) && !in_array ($ record , $ this ->scheduled )) {
185
+ if (!in_array ($ record , $ this ->updated , true ) && !in_array ($ record , $ this ->scheduled , true )) {
186
186
//Indicating that record pivot data has been changed
187
187
$ this ->updated [] = $ record ;
188
188
}
@@ -267,13 +267,13 @@ public function queueCommands(ContextualCommandInterface $parentCommand): Comman
267
267
$ transaction ->addCommand ($ recordCommand = $ record ->queueStore (), true );
268
268
269
269
//Create or refresh link between records
270
- if (in_array ($ record , $ this ->scheduled )) {
270
+ if (in_array ($ record , $ this ->scheduled , true )) {
271
271
//Create link
272
272
$ command = new InsertCommand (
273
273
$ this ->pivotTable (),
274
274
$ this ->pivotData ->offsetGet ($ record )
275
275
);
276
- } elseif (in_array ($ record , $ this ->updated )) {
276
+ } elseif (in_array ($ record , $ this ->updated , true )) {
277
277
//Update link (expecting both records to be already loaded)
278
278
$ command = new UpdateCommand (
279
279
$ this ->pivotTable (),
0 commit comments