Catch various errors.

This commit is contained in:
James Cole
2018-07-26 06:27:52 +02:00
parent 6bcfea1de4
commit 89be30c4b9
19 changed files with 76 additions and 50 deletions

View File

@@ -67,7 +67,7 @@ trait BillServiceTrait
*/
public function updateNote(Bill $bill, string $note): bool
{
if (0 === \strlen($note)) {
if ('' === $note) {
$dbNote = $bill->notes()->first();
if (null !== $dbNote) {
$dbNote->delete(); // @codeCoverageIgnore