Support » Plugin: Exchange Rates Today » Fatal error: … on line 36
3 years, 6 months ago
Fatal error: Cannot use $this as parameter in …public_html/x.pp.ua/wp-content/plugins/exchange-rates-today/exchange-rates-today.php on line 36
3 years, 5 months ago
When translating a site from php 5.6 to 7.xx, you can get the following template error:
FATAL ERROR: CAN’T USE THIS AS A PARAMETER IN / TEMPLASTS /****/LAYOUTS/FILE.PHP ON LINE **
Basically, the line that causes this error looks something like this:
BDT_HEADERSTYLE FUNCTION ($ IT)
It is treated simply:
change $ this, for example, to $ then or any other unused variable.
Make a replacement in the entire template file.
Thank you a lot, Artyom
Now it works. I changed it to $ktoday wich will never be used by other developers, I hope)
Maybe you should update your plugins with new variable so more people will use it out of box with no code edits.