Support » Plugin: Menu Image » Recent Update Error: fatal error.

  • Hi, I updated the plugin yesterday (everything worked fine before update) and now receive this error message: I’ve had to disable the plugin manually as it breaks the site.

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘:’ in /var/sites/c/mysite/public_html/wp-content/plugins/bad-plugin-menu-image/menu-image.php on line 574

    And this is the code within menu-image.php

    public function menu_item_custom_fields( $item_id, $item, $depth, $args ) { ?>
    		<div class="field-image hide-if-no-js wp-media-buttons">
    			<?php echo $this->wp_post_thumbnail_html( $item_id ?: $item->ID ) ?>
    		</div>
    	<?php
    	}

    https://wordpress.org/plugins/menu-image/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author zviryatko

    (@zviryatko)

    Hi, I think you used PHP version less then 5.3, because “?:” operator is introduced in 5.3, update your php version to more stable (now it 7.0.9) or at least to old-stable (5.5.38).

    Php version 5.2 is not supported a long time ago, so it’s not protected from vulnerabilities, I advice you to ask your hosting provider to updated php version.

    Btw, all next php version add ~15% to performance, so you site will work faster 😉

    Hi zviryatko thank you for the lightning fast response. Yes, you are correct, it was my hosting version of PHP, I have upgraded. All working as expected, thanks again, great support.

    Hi,

    My client’s host only updates to 5.4, and I’m still getting error. Can this operator be changed to anything that will work on PHP 5.4?

    Thanks!

    Plugin Author zviryatko

    (@zviryatko)

    This is working on php 5.4 and for all newest version (also for 5.3), see this https://3v4l.org/le0Ys, I think you have not a 5.4 version, check it again.

    Plugin Author zviryatko

    (@zviryatko)

    Ok, I’ll revert back code to support old php versions, seem many users have troubles with this.

    Thanks!

    Let me know when I can re-download.

    Plugin Author zviryatko

    (@zviryatko)

    Check the latest version.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Recent Update Error: fatal error.’ is closed to new replies.