-
-
Notifications
You must be signed in to change notification settings - Fork 194
MongoDB\Driver\Cursor::getId() expects exactly 0 arguments, 1 given #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -212,7 +212,7 @@ public function buildCursor($db = null) | |||||
*/ | ||||||
protected function fetchRows($cursor, $all = true, $indexBy = null) | ||||||
{ | ||||||
$token = 'fetch cursor id = ' . $cursor->getId(true); | ||||||
$token = 'fetch cursor id = ' . $cursor->getId(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated getId() by removing the extraneous argument to prevent runtime exceptions in logging.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
Yii::info($token, __METHOD__); | ||||||
try { | ||||||
Yii::beginProfile($token, __METHOD__); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -82,7 +82,7 @@ public function toArray() | |||||||||||||
*/ | ||||||||||||||
public function getId() | ||||||||||||||
{ | ||||||||||||||
return $this->getInnerIterator()->getId(true); | ||||||||||||||
return $this->getInnerIterator()->getId(); | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the unsupported argument from getId(), which now aligns with the MongoDB driver's expected method signature.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the invalid argument from the getId() call to fix the bug related to incorrect method usage.
Copilot uses AI. Check for mistakes.