Author Topic: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]  (Read 52311 times)

jripleypm

  • Beginner
  • *
  • Posts: 2
Hey everyone, stoked to get this component running!  I installed the main COM_ and a few additional moduals, and then linked it to the page I wanted it to load on.  when I click on that link I get the following error:

Parse error: syntax error, unexpected '=', expecting ')' in C:\Domains\2hip.com\wwwroot\new\administrator\components\com_virtuemart\classes\payment\ps_paypal_api.php on line 1395

I opened the file and the line that is having issues is as follows:


 function getCartnvpstr( &$order_totals=array() ) {


I'm at a bit of a loss here.. it looks ok from what I can tell but i'm not a coding guru.. any help would be greatly apreciated!  I kind of hit a wall on my project!

Joseph Kwan

  • Advanced
  • Hero Member
  • *****
  • Posts: 2344
Re: Parse error: syntax error, unexpected '=', expecting ')'
« Reply #1 on: July 30, 2010, 20:54:37 pm »
Try remove =array() and see if this fix the problem.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

jripleypm

  • Beginner
  • *
  • Posts: 2
Re: Parse error: syntax error, unexpected '=', expecting ')'
« Reply #2 on: July 30, 2010, 21:50:30 pm »
Thats whats up!  Thank you! I knew it had to be something simple!

bobbiek

  • Beginner
  • *
  • Posts: 2
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #3 on: August 03, 2010, 02:52:22 am »
I am a REAL newbie here.  My Canadian friend and I are trying to get this up together and neither one of us can figure it out.

What file are you talking about?
I opened the file and the line that is having issues is as follows:


 function getCartnvpstr( &$order_totals=array() ) {

When we go to the configuration we cannot find these words in the html.  Neither of us knows what file is being spoken about that should be opened and changed other than Paypal/configuration.

Any help in newbie terms would be appreciated.  This is only the third site I have built in five years and each time with a different program so I am not very advanced in this.

Thanks.

Joseph Kwan

  • Advanced
  • Hero Member
  • *****
  • Posts: 2344
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #4 on: August 03, 2010, 09:41:46 am »
Change

function getCartnvpstr( &$order_totals=array() ) {

to

function getCartnvpstr( &$order_totals) {
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

bobbiek

  • Beginner
  • *
  • Posts: 2
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #5 on: August 04, 2010, 04:24:26 am »
Thank you.  It worked once I understood.  Took awhile to figure out how to find the file.  But I did.  Thanks.

luck3d

  • Beginner
  • *
  • Posts: 1
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #6 on: September 06, 2010, 15:45:59 pm »
I made the changes said the above, but not solved my problem. Anybody else have any ideas?

Joseph Kwan

  • Advanced
  • Hero Member
  • *****
  • Posts: 2344
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #7 on: September 07, 2010, 05:31:27 am »
It is not possible that you changed the file and still the get the same error. Make sure the file is actually changed. If you get a different error, you have to report it here.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

ballyhoo

  • Beginner
  • *
  • Posts: 4
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #8 on: September 22, 2010, 13:33:40 pm »
Thanks a lot, that saved my day ;-))

sandroide

  • Beginner
  • *
  • Posts: 3
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #9 on: September 29, 2010, 13:59:03 pm »
Hi Joseph,
I had already applied your code suggestion to my site
www.tienderoticalatentacion.com
(Joomla! 1.5.20 and VM 1.1.5)
But was goes on when I click on Product details is that Joomla "loses" the template and the layout is completely wrong.
You can check it out by clicking on Accesorios and then on the product title or details.

Thanks in advance for your help.
Sandro

amenor

  • Beginner
  • *
  • Posts: 4
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #10 on: October 04, 2010, 19:35:39 pm »
But in my case I did not VirtueMart folder administrator / components / com_virtuemart / classes / payment /.

enochRoot

  • Beginner
  • *
  • Posts: 6
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #11 on: December 08, 2010, 15:48:14 pm »
Of course this fixes the problem as you can't assign a default value to a reference (I guess). I'd still love to know why it was put there in the first place... the programmer in question must have had a reason???

Async

  • Beginner
  • *
  • Posts: 2
    • Ventro
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #12 on: August 10, 2011, 08:37:31 am »
thank you  ;D

adn424

  • Beginner
  • *
  • Posts: 4
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #13 on: August 27, 2011, 07:59:57 am »
At first the solution did not work for me, but after changing php version on hosting from php4 to php5, the said solution worked for me as well :)

and32

  • Beginner
  • *
  • Posts: 1
Re: Parse error: syntax error, unexpected '=', expecting ')' [SOLVED]
« Reply #14 on: July 30, 2012, 23:39:35 pm »
Change

function getCartnvpstr( &$order_totals=array() ) {

to

function getCartnvpstr( &$order_totals) {

Same problem here!  Parse error: syntax error, unexpected '('       on line 6    the line             register_sidebar(array(       Please help!