Error caused by "The Grid" plugin in PHP 7.4

As far as I can tell PHP 7.4 got a bit stricter with its error handling.

In the-grid/frontend/the-grid-init.class.php on line 276 there is the following line.

if ($this->grid_options[‘mediaelement’] && $this->grid_options[‘mediaelement_ex’]) {

which results in the following error:

Trying to access array offset on value of type null

I was able to resolve this error by changing the line to:

if( is_array( $this->grid_options ) && array_key_exists( ‘mediaelement’, $this->grid_options ) && array_key_exists( ‘mediaelement’, $this->grid_options ) ) {

Hi @alex5252,

Thank you for writing in and for your tip, can you confirm your The Grid plugin is in the latest supported version (2.7.4)

Cheers!

These are the current versions of the most relevant things on the site.

PHP 7.4
WP 5.4.1
PRO 3.2.3
The Grid 2.7.4

Hi @alex5252,

Thank you for your report. We will inform The Grid developers.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.