Your Trusted Partner

Category: Blog (page 1 of 19)

PHP 7 and WordPress: How to FIX unexpected ‘new’ (T_NEW) error


after I’ve upgraded my PHP to version 7 I found the following error being displayed for one plugin I was using:

Plugin could not be activated because it triggered a fatal error.

Parse error: syntax error, unexpected ‘new’ (T_NEW) in /var/www/vhosts/wp-content/plugins/smilies-themer/smilies-themer.php on line 80

The solution was pretty easy. Just open an editor on the file and line PHP tells you. Now you should see something like

$this->smilies =& new smilies_package($this->current_smilies);

Here they made some changes in PHP 7. You can’t assign classes with a & symbol anymore. So just remove that & symbol and the plugin will work fine again (search for multiple occurences).

Here you go, have fun with very fast working new PHP 7 and your (old) WordPress !

How to fix Regular Labs Library plugin is outdated Problem in Joomla

How to fix Geodirectory Map Api Issue

How do I install Magento 2 in Cpanel

How to install YOURLS (Your Own URL Shortener) on Shared Cpanel

Older posts

© 2018 Webdesigncr3ator

Theme by Anders NorenUp ↑