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

sibany’s picture

if (!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!

matglas86’s picture

Do you use php 5.2? Because with my 5.4 it was already working. Testing on 5.2 would be helpfull.

siramsay’s picture

this line 289--> $this::addWidgetJs(); to $this->addWidgetJs(); works

my version for this site install
PHP Version 5.2.17

ergow’s picture

Hi,
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

matglas86’s picture

Did you try the patch? Didit work?

prinds’s picture

I can confirm that the patch is working with php 5.2.11

Stephen Ollman’s picture

#1

/sites/all/modules/addthis/classes/AddThis.php

Change line 289

$this::addWidgetJs();

to

$this->addWidgetJs();

matglas86’s picture

Status: Needs review » Fixed

Fixed now in dev version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.