Skip Navigation

[Closed] PHP Fatal Error: Uncaught TypeError (PHP8) Forms

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 3 voices.

Last updated by Waqar 1 year, 11 months ago.

Assisted by: Waqar.

Author
Posts
#2511317

My custom post type's edit form had been working in an environment on PHP7.4, after having upgraded to PHP8.0 I am getting this error:

```
PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /nas/content/live/findcrastag/wp-content/plugins/types/vendor/toolset/toolset-common/toolset-forms/classes/class.conditional.php:325
```

Also noticed that someone else had this issue, but it was dismissed as Toolset not fully supporting PHP8 at the time. Now that Forms 2.6.13 has been released with support for PHP8, I believe this error still might exist.

(https://toolset.com/forums/topic/toolset-is-causing-a-critical-error-on-my-website/)

#2511649

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Harry

Do you have more specific details of the steps to reproduce the error?

Your "custom post edit form".

Do you mean the error occurs when loading a page on the front end with a form to edit a custom post, or submitting the form? Or while editing the form itself in the back end?

#2512537

Yes, the error happens when a user views a WordPress page that has an embedded View. The View has the embedded Form that filters posts with a query Post ID Filter of "Include only posts with IDs determined by the URL parameter "post_ids" eg. yoursite/page-with-this-view/?post_ids=1"

When visiting this page the 500 error is thrown (hidden link)

There are other forms on my site that are working just fine - the User Forms to edit user details work okay. For some reason just this form is problematic.

Can I provide you with other details, or perhaps the full stack trace leading up to the error?

Thank you,
Harry

#2512801

Hi Harry,

Thanks for writing back.

Can you please check your custom field settings (especially the one related to the post type this particular form is using) and make sure they don't include any incomplete/incorrect 'Conditional display' options?

In case there are no such conditions set, you're welcome to share temporary admin login details, along with the link to the page where this view and form can be seen.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

The topic ‘[Closed] PHP Fatal Error: Uncaught TypeError (PHP8) Forms’ is closed to new replies.