Skip Navigation

[Resolved] php 7.4 and back office error on save

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 1.77 hours from now. 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 4 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1647083

I am trying to:
save a CPT where I entered a custom archive slug including a "/"

Link to a page where the issue can be seen:
No. I passed to 7.3

I expected to see:
Save OK

Instead, I got:
Error on save : using array_key_exists on object . Error on 7.4. On 7.3 error does not appear.

Good evening, thank me.

#1647315

Hello,

Please elaborate the question with more details:
- Provide the full PHP debug logs
- provide detail steps to duplicate the same problem.

I have tried below steps in my localhost, please correct me if there is any missing.
1) In a PHP 7.4 environment, install Toolset Types plugin in a fresh WP installation
2) Dashboard-> Settings-> Permalink, choose option "Post name"
3) Create a custom post type "test-cpt", in input box below option "has_archive", fill value: /
4) Create a new "test-cpt" post, publish the post, it works fine, and in front-end the URL is:
hidden link
I don't see any PHP errors

#1651297

Hello Luan, long time , no see !

Sorry for the delay in my answer.
This is the output error I am still reproducing on upgrading to php 7.4:

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in xxx/wp-content/plugins/types/vendor/toolset/types/embedded/classes/class.wpcf-post-types.php on line 471

However : The error does appear too when I don't insert a slash in the box. I tried to see which field was inducing the error but did not find.
My Custom post type is quite simple, no relationships, a majority of defaults.
PHP exact version is 7.4.5. WP and all plugins are up to date (Type 3,3,10)
I'm sorry I won't be able to investigate further or to give you more details as I am missing time. I downgraded my server to php 7.3 ans everything works fine.
I just wanted to give toolset information about what I think is a bug. Feel free to pass the issue as resolved then !

Have a good day

Charles

#1654893

OK, I close this thread.