Updated: Comment #1
Problem/Motivation
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
/home/nisekosn/public_html/nsn/ns2/sites/all/modules/addthis/classes/AddThis.php
on line 289
The call here is $this::addWidgetJs(). But the :: is incorrect. This should be ->.
I have committed this already in commit 1c5b5.
Proposed resolution
Changes in head should be tested.
Remaining tasks
Testing.
User interface changes
No changes
API changes
No changes.
Original message
I received a message by size because he received a error. This was the message.
======
Hi Matthias,
I was upgrading addthis and got this error on running update and then cron
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
/home/nisekosn/public_html/nsn/ns2/sites/all/modules/addthis/classes/AddThis.php
on line 289
I found this
http://stackoverflow.com/questions/1966010/what-does-this-mean-parse-err...
I replaced the double colon with -> syntax on line 289 and it works unsure if
this is correct.
thanks for you work on this
simo
Comments
Comment #1
sibany CreditAttribution: sibany commentedif (!isset($loaded)) {
$loaded = TRUE;
this line 289--> $this::addWidgetJs(); to $this->addWidgetJs();
return TRUE;
}
return FALSE;
confirming it works!
using 7.x-4.0-alpha3
Thanks!
Comment #2
matglas86 CreditAttribution: matglas86 commentedDo you use php 5.2? Because with my 5.4 it was already working. Testing on 5.2 would be helpfull.
Comment #3
siramsay CreditAttribution: siramsay commentedthis line 289--> $this::addWidgetJs(); to $this->addWidgetJs(); works
my version for this site install
PHP Version 5.2.17
Comment #4
ergow CreditAttribution: ergow commentedHi,
I have found the same trouble when i upgrade Addthis 7.x-4.0-alpha3
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home3/qjsjtudi/public_html/sites/all/modules/addthis/classes/AddThis.php on line 289
my php version is 5.2.17 too
Comment #5
matglas86 CreditAttribution: matglas86 commentedDid you try the patch? Didit work?
Comment #6
prinds CreditAttribution: prinds commentedI can confirm that the patch is working with php 5.2.11
Comment #7
Stephen Ollman#1
/sites/all/modules/addthis/classes/AddThis.php
Change line 289
$this::addWidgetJs();
to
$this->addWidgetJs();
Comment #8
matglas86 CreditAttribution: matglas86 commentedFixed now in dev version.