-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add new phan rule PhanMismatchReturn #4914
Changes from all commits
58b9ad7
0839d8e
77c129d
da6ce46
fa37fe8
a04e6ef
7d67ce7
e97dd6f
a120bdd
ced1724
f0ad26c
609b7ac
490f293
47a19a2
d94e433
5463c40
6804a22
4656150
8624fb2
9c81639
a32726d
8d8eb6f
5e8f628
95e99c3
dc02e62
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 |
---|---|---|
|
@@ -208,7 +208,9 @@ class Create_Timepoint extends \NDB_Form | |
WHERE CenterID =:cid", | ||
array('cid' => $siteID) | ||
); | ||
$psc_labelOptions[$siteID] = $center['Name']; | ||
if (!is_null($center)) { | ||
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. Another theme in this PR is verifying that DB results are not |
||
$psc_labelOptions[$siteID] = $center['Name']; | ||
} | ||
} | ||
} | ||
$this->addSelect('psc', 'Site', $psc_labelOptions); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
} else { | ||
$target_path = $base_path . $fileName; | ||
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_path)) { | ||
$success = $DB->insert( | ||
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. insert + update always return |
||
$DB->insert( | ||
'data_release', | ||
array( | ||
'file_name' => $fileName, | ||
|
@@ -68,7 +68,7 @@ | |
'upload_date' => $upload_date, | ||
) | ||
); | ||
$success = $DB->insert( | ||
$DB->insert( | ||
'data_release_permissions', | ||
array( | ||
'userid' => $user_ID, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,11 +123,17 @@ class Document_Repository extends \NDB_Menu_Filter_Form | |
$categoryName = $value['category_name']; | ||
do { | ||
if ($value['parent_id'] != 0) { | ||
$depth += 1; | ||
$parent_id = $value['parent_id']; | ||
$query = "SELECT * FROM document_repository_categories". | ||
$depth += 1; | ||
$parent_id = $value['parent_id']; | ||
$query = "SELECT * FROM document_repository_categories". | ||
" where id=$parent_id"; | ||
$value = $DB->pselectRow($query, array()); | ||
$value = $DB->pselectRow($query, array()); | ||
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. should use label instead of direct value in query. |
||
if (is_null($value)) { | ||
throw new \LorisException( | ||
'Could not find data for specified parent ID. ' | ||
. 'Cannot parse category.' | ||
); | ||
} | ||
$categoryName = $value['category_name'] . ">" . $categoryName; | ||
} | ||
} while ($value['parent_id'] != 0); | ||
|
@@ -193,7 +199,6 @@ class Document_Repository extends \NDB_Menu_Filter_Form | |
} | ||
$this->group_by = ''; | ||
$this->order_by = 'v.File_name'; | ||
return true; | ||
} | ||
|
||
/** | ||
|
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.
unused. same with below.