diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 80b5a4dd0f..2d39f48908 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -69,8 +69,6 @@ class SetupController extends Controller } if ($check['system_health'] === false) { - nlog($check); - return response('Oops, something went wrong. Check your logs.'); /* We should never reach this block, but just in case. */ } diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 044b2cfd7e..e77379786c 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -193,8 +193,6 @@ class NinjaMailerJob implements ShouldQueue return $this->setMailDriver(); } - - /* * Now that our token is refreshed and valid we can boot the * mail driver at runtime and also set the token which will persist diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index b530105643..cfd9504b18 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -175,7 +175,7 @@ class ReminderJob implements ShouldQueue $invoice = $invoice->calc()->getInvoice(); $invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save(); - $invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$this->invoice->number}"); + $invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}"); return $invoice; } diff --git a/app/Listeners/Invoice/InvoiceEmailedNotification.php b/app/Listeners/Invoice/InvoiceEmailedNotification.php index 09d56d5349..59ac94e2c3 100644 --- a/app/Listeners/Invoice/InvoiceEmailedNotification.php +++ b/app/Listeners/Invoice/InvoiceEmailedNotification.php @@ -63,10 +63,9 @@ class InvoiceEmailedNotification implements ShouldQueue $methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']); /* If one of the methods is email then we fire the EntitySentMailer */ - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); - $nmo->to_user = $user; NinjaMailerJob::dispatch($nmo); diff --git a/app/Listeners/Invoice/InvoiceFailedEmailNotification.php b/app/Listeners/Invoice/InvoiceFailedEmailNotification.php index 3f6551de41..ac89010cad 100644 --- a/app/Listeners/Invoice/InvoiceFailedEmailNotification.php +++ b/app/Listeners/Invoice/InvoiceFailedEmailNotification.php @@ -58,7 +58,7 @@ class InvoiceFailedEmailNotification $methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']); - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); $nmo->to_user = $user; diff --git a/app/Listeners/Quote/QuoteCreatedNotification.php b/app/Listeners/Quote/QuoteCreatedNotification.php index c258b0d33c..699b6eba88 100644 --- a/app/Listeners/Quote/QuoteCreatedNotification.php +++ b/app/Listeners/Quote/QuoteCreatedNotification.php @@ -60,7 +60,7 @@ class QuoteCreatedNotification implements ShouldQueue $methods = $this->findUserNotificationTypes($quote->invitations()->first(), $company_user, 'quote', ['all_notifications', 'quote_created', 'quote_created_all']); /* If one of the methods is email then we fire the EntitySentMailer */ - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); diff --git a/app/PaymentDrivers/WePay/ACH.php b/app/PaymentDrivers/WePay/ACH.php index 1060ee5c04..31fb62d46b 100644 --- a/app/PaymentDrivers/WePay/ACH.php +++ b/app/PaymentDrivers/WePay/ACH.php @@ -194,7 +194,7 @@ class ACH $token = ClientGatewayToken::find($this->decodePrimaryKey($request->input('source'))); $token_meta = $token->meta; - if($token_meta->state != "authorized") + if(!property_exists($token_meta, 'state') || $token_meta->state != "authorized") return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]); $app_fee = (config('ninja.wepay.fee_ach_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed'); diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index bda826b22c..a2642657de 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1750,6 +1750,7 @@ $LANG = array( 'lang_Danish' => 'Danish', 'lang_Dutch' => 'Dutch', 'lang_English' => 'English', + 'lang_English - United States' => 'English', 'lang_French' => 'French', 'lang_French - Canada' => 'French - Canada', 'lang_German' => 'German', diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php index 8ec6928f28..538ef194ff 100644 --- a/tests/Feature/CompanyTest.php +++ b/tests/Feature/CompanyTest.php @@ -100,7 +100,6 @@ class CompanyTest extends TestCase $settings->invoice_design_id = '2'; $settings->quote_design_id = '1'; -nlog($settings); $company->settings = $settings; $response = $this->withHeaders([