PHP Fatal error: Uncaught Error: Undefined constant “1” in /wp-content/plugins/wpml-string-translation/inc/potx.php:457

Su WPML String Translation v.3.2.6, se si ha php > 8.0, in fase di scansione di stringhe del tema, avviene un error 500.

 

Soluzione: Modificare il file wp-content/plugins/wpml-string-translation/inc/potx.php alle linea 456 da

$constant_val = @constant( $_potx_tokens[ $ti + $context_offset ][ 1 ] );

a

$constant_val = defined($_potx_tokens[ $ti + $context_offset ][ 1 ]) ? @constant( $_potx_tokens[ $ti + $context_offset ][ 1 ] ) : null;

 

wordPress

Comments are disabled.