Saltar navegación

[Resuelto] Problem upgrading to php 8.1

This support ticket is created hace 2 años, 2 meses. 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por wilfridoO-2 hace 2 años, 2 meses.

Asistido por: Nigel.

Autor
Mensajes
#2500637

Hello,

When I upgrade my site to php version 8.1 everything seems to be fine. But if I edit a page with the beaver builder plugin I get an error:

[error] 36931#36931: *359 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in .../plugins/toolset-maps/includes/toolset-maps-views.class.php:298
Stack trace:
#0 .../plugins/toolset-maps/includes/toolset-maps-views.class.php(298): method_exists(NULL, 'is_block_editor')

It seems to give an error in the "method_exists" method in one of your plugins.

Can you help me?

Regards

#2500715

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi there

I'm not sure what exactly triggers the issue (something connected to Beaver Builder), but I can see in our code where logically an error could be triggered.

I will raise this with the developers so that they can fix it, but in the meantime you could try editing this file directly and make the following change.

Update line 298 of the file plugins/toolset-maps/includes/toolset-maps-views.class.php like so:

			return ( !is_null( $current_screen ) && method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() );

I suspect before PHP 8.1 this was just giving a PHP Notice, but now is giving an error.

Let me know if that resolves the issue, please.

#2500729

My issue is resolved now.

Thank you!