File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ protected function getAttributeFromArray($key)
206
206
public function setAttribute ($ key , $ value )
207
207
{
208
208
// Convert _id to ObjectID.
209
- if ($ key === '_id ' && is_string ($ value )) {
209
+ if ($ key == '_id ' && is_string ($ value )) {
210
210
$ builder = $ this ->newBaseQueryBuilder ();
211
211
212
212
$ value = $ builder ->convertKey ($ value );
@@ -295,7 +295,7 @@ public function originalIsEquivalent($key)
295
295
$ attribute = $ attribute instanceof UTCDateTime ? $ this ->asDateTime ($ attribute ) : $ attribute ;
296
296
$ original = $ original instanceof UTCDateTime ? $ this ->asDateTime ($ original ) : $ original ;
297
297
298
- return $ attribute === $ original ;
298
+ return $ attribute == $ original ;
299
299
}
300
300
301
301
if ($ this ->hasCast ($ key , static ::$ primitiveCastTypes )) {
Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ protected function associateExisting($model)
285
285
286
286
// Replace the document in the parent model.
287
287
foreach ($ records as &$ record ) {
288
- if ($ record [$ primaryKey ] === $ key ) {
288
+ if ($ record [$ primaryKey ] == $ key ) {
289
289
$ record = $ model ->getAttributes ();
290
290
break ;
291
291
}
Original file line number Diff line number Diff line change @@ -1012,7 +1012,6 @@ public function testFirstOrCreate(): void
1012
1012
$ name = 'Jane Poe ' ;
1013
1013
1014
1014
$ user = User::where ('name ' , $ name )->first ();
1015
- assert ($ user instanceof User);
1016
1015
$ this ->assertNull ($ user );
1017
1016
1018
1017
$ user = User::firstOrCreate (compact ('name ' ));
You can’t perform that action at this time.
0 commit comments