Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2020-11-03 11:43:43
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Fatal error: Cannot use $this as parameter
I’m getting the following error:
Fatal error: Cannot use $this as parameter in /home/grampia1/public_html/textpattern/lib/txplib_misc.php(1870) : eval()'d code on line 716
I’m trying to transfer a website from Mac to Live hosting.
I can set up a vanilla TXP website on the live hosting but when I copy across the local files & database dump file, restore it using phpMyAdmin, then refresh TXP admin the above error is generated.
Any thoughts?
Offline
Re: Fatal error: Cannot use $this as parameter
Would it be caused by a plugin? Is the error still present when all plugins are off?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2020-11-03 12:06:13
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Fatal error: Cannot use $this as parameter
Hi Yiannis, thanks for the reply.
It looks like it’s a PHP version issue. Changed the online version to match my local version and … phew!
Offline
Re: Fatal error: Cannot use $this as parameter
👍
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
#6 2020-11-04 05:55:30
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Fatal error: Cannot use $this as parameter
Thanks guys. Have found a couple of plugins that use $this
as a variable but there’s nothing obvious as to why it would be a problem in PHP 7.2.34 but not in 5.6.40.
Cheers,
Adi
Offline
Re: Fatal error: Cannot use $this as parameter
It is indeed strange as I am using plugins using $this
on PHP version 7.4.10 without any issues.
- rah_external_output 1.0.4 (I know it is no longer needed but I am too lazy to find all instances in other sites)
- ied_plugin_composer 1.2.1
- oui_cookie 1.0.0-Beta4
- com_connect 4.7
- rss_admin_db_manager 4.6
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Fatal error: Cannot use $this as parameter
gomedia wrote #326668:
Have found a couple of plugins that use
$this
as a variable but there’s nothing obvious as to why it would be a problem in PHP 7.2.34 but not in 5.6.40.
Seemingly the switch has been operated in php 7.1.
colak wrote #326669:
It is indeed strange as I am using plugins using
$this
on PHP version 7.4.10 without any issues.
$this
is not deprecated, only its behavior in certain constructions is.
Offline
#9 2020-11-04 08:36:51
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Fatal error: Cannot use $this as parameter
One learns something new every day! Thanks Oleg.
Offline