• Resolved lumisajab

    (@lumisajab)


    After the latest module update site is fully down with PHP fatal error!
    Fatal error: Cannot use [] for reading in /wp-content/plugins/mappress-google-maps-for-wordpress/mappress_settings.php on line 164

    Problematic lines are:

    if ($i === false) {
    			$style['id'] = ($id) ? $id : uniqid();
    			$options->$setting[] = $style;
    		} else {
    			$options->$setting[$i] = $style;
    		}

    This $options->$setting[] gives fatal error!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lumisajab

    (@lumisajab)

    Should it be like that?

    if ($i === false) {
    			$style['id'] = ($id) ? $id : uniqid();
    			$options->{$setting}[] = $style;
    		} else {
    			$options->{$setting}[$i] = $style;
    		}

    This fixed for us.

    • This reply was modified 3 years, 3 months ago by lumisajab.
    Plugin Author chrisvrichardson

    (@chrisvrichardson)

    Hi,

    Sorry for the trouble, and thanks for the update. This doesn’t happen on my test systems, so I’m guessing we have different versions of PHP. Do you know your PHP version by any chance?

    Thread Starter lumisajab

    (@lumisajab)

    I think PHP version was 5.6

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal error: Cannot use [] for reading in mappress_settings.php’ is closed to new replies.