• tokach

    (@tokach)


    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

    =((

    • This topic was modified 6 years ago by tokach.
Viewing 2 replies - 1 through 2 (of 2 total)
  • delicacy26

    (@delicacy26)

    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.

    Thread Starter tokach

    (@tokach)

    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.

    Thank you.

    • This reply was modified 5 years, 12 months ago by tokach.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error: … on line 36’ is closed to new replies.