-
Notifications
You must be signed in to change notification settings - Fork 175
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
More Phan Fixes #3535
More Phan Fixes #3535
Conversation
php/libraries/Database.class.inc
Outdated
@@ -619,7 +619,7 @@ class Database | |||
*/ | |||
function selectRow($query, &$result) | |||
{ | |||
$this->select($query, $result); | |||
$result = $this->pselect($query, []); |
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.
[]
=> array()
Unless you want to start a new convention
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.
:(
php/libraries/Database.class.inc
Outdated
@@ -641,8 +641,7 @@ class Database | |||
*/ | |||
function selectOne($query) | |||
{ | |||
$result = null; | |||
$this->select($query, $result); | |||
$result = $this->pselect($query); |
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.
this require a second argument
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.
yes, I guess that's one of the error types which are still suppressed by phan.. I'll fix it.
The Travis is failing because of phpcs in htdocs/survey.php |
updated with changes (..but review wasn't autodismissed..)
@@ -199,7 +199,7 @@ function handleOPTIONS() | |||
{ | |||
$this->Header( | |||
"Access-Control-Allow-Methods: ". | |||
join($this->AllowedMethods, ",") | |||
join(",", $this->AllowedMethods) | |||
); |
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.
Would it make more sense to use implode() in lieu of join() as PHP docs description is in implode() and join() page refer to implode() page.
Not a blocker, just a discussion
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.
Yes, but this is the minimum change to fix the "PhanParamSuspiciousOrder" error
This was included in #3544, but not auto-closed because the merge was squashed.. |
This does another round of randomly fixes some of the smaller, low hanging fruit errors detected by phan.