Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Error when uploading attachment to payment

Richard Sems   ( User )

Commented 2 months ago

when I attach a PDF to a payment under the Payments: "Other" tab - I get this error - Call to a member function isValid() on array. I'm using he self hosted version.

Richard Sems   ( User )

Commented 2 months ago

I have a screen shot of the error, but there does not seem to be a place to upload it

Elizabeth Wotawa   ( User )

Commented 1 week ago

Hi Richard,

The forum doesn't accept image uploads — please paste the error text and the
last lines of storage/logs/laravel.log instead (that's more useful than the
screenshot anyway).

"Call to a member function isValid() on array" comes from the attachment
upload path: the transaction form posts attachment[] (multiple files) and
each item is expected to be a single uploaded file. The error means one item
arrived as an array instead, which normally happens when:

- the form is overridden by a third-party app/custom theme,
- the record is created over the API with a differently shaped attachment
field,
- or you are on an older 3.x build.

So we can reproduce it, please share:

1. Your Akaunting version (Settings > About / footer)
2. PHP version
3. Installed apps (especially any that touch payments or custom fields)
4. Whether it happens on a brand new payment as well, or only on edit
5. The full stack trace from storage/logs/laravel.log

With the trace we can see the exact file and line and fix it properly.

Please login or register to leave a response.

Showing 1 to 3 of 3 discussions