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 (#7164)

# Description & Issue number it closes 
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. -->

Closes #7161 
Closes #7162
  • Loading branch information
DAcodedBEAT committed Sep 22, 2024
2 parents 6c8a894 + 2f9712f commit cdb952b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions cypress/e2e/ui/finance/finance.deposits.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/// <reference types="cypress" />

context("Finance Deposits", () => {
it("Envelope Manager", () => {
cy.loginAdmin("ManageEnvelopes.php");
cy.contains("Envelope Manager");
});

it("Create a new Deposit", () => {
cy.loginAdmin("FindDepositSlip.php");
cy.contains("Add New Deposit");
Expand Down
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 cdb952b

Please sign in to comment.