Skip to content

Commit

Permalink
attempt to resolve reported http 500s in ManageEnvelopes and Donation…
Browse files Browse the repository at this point in the history
…FundEditor
  • Loading branch information
DAcodedBEAT committed Sep 22, 2024
1 parent 6c8a894 commit 1ef957f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DonationFundEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
} else {
// Check if we're adding a fund
if (isset($_POST['AddField'])) {
$checkExisting = DonationFundQuery::create()->filterByName($_POST['newFieldName'])->findOne();
if (count($checkExisting) > 0) {
$checkExisting = DonationFundQuery::create()->findOneByName($_POST['newFieldName']);
if ($checkExisting !== null) {
$bNewNameError = true;
} else {
$donation = new DonationFund();
Expand Down
2 changes: 1 addition & 1 deletion src/ManageEnvelopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Security: User must have finance permission to use this form
AuthenticationManager::redirectHomeIfFalse(AuthenticationManager::getCurrentUser()->isFinanceEnabled());

$iClassification = null;
$iClassification = 0;
if (isset($_POST['Classification'])) {
$iClassification = (int) InputUtils::legacyFilterInput($_POST['Classification'], 'int');
$_SESSION['classification'] = $iClassification;
Expand Down

0 comments on commit 1ef957f

Please sign in to comment.