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
4cfe1821
Unverified
Commit
4cfe1821
authored
Jul 11, 2018
by
Jeremy Mikola
Committed by
GitHub
Jul 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pre-3.0 compat code in FindAndModify
parent
0534ed0f
Show 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 @
4cfe1821
...
@@ -217,17 +217,6 @@ class FindAndModify implements Executable, Explainable
...
@@ -217,17 +217,6 @@ class FindAndModify implements Executable, Explainable
return
null
;
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
))
{
if
(
!
is_object
(
$result
->
value
))
{
throw
new
UnexpectedValueException
(
'findAndModify command did not return a "value" document'
);
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