Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
9813df19
Unverified
Commit
9813df19
authored
Jul 12, 2018
by
Jeremy Mikola
Committed by
GitHub
Jul 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #561 from mongodb/pre-3_0-fam
Remove pre-3.0 compat code in FindAndModify
parents
0534ed0f
4cfe1821
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
11 deletions
+0
-11
FindAndModify.php
src/Operation/FindAndModify.php
+0
-11
No files found.
src/Operation/FindAndModify.php
View file @
9813df19
...
...
@@ -217,17 +217,6 @@ class FindAndModify implements Executable, Explainable
return
null
;
}
/* Prior to 3.0, findAndModify returns an empty document instead of null
* when an upsert is performed and the pre-modified document was
* requested.
*/
if
(
$this
->
options
[
'upsert'
]
&&
!
$this
->
options
[
'new'
]
&&
isset
(
$result
->
lastErrorObject
->
updatedExisting
)
&&
!
$result
->
lastErrorObject
->
updatedExisting
)
{
return
null
;
}
if
(
!
is_object
(
$result
->
value
))
{
throw
new
UnexpectedValueException
(
'findAndModify command did not return a "value" document'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment