-2

I haven't opened my main domain for a month or so, and when I did, I got this error: Parse error: syntax error, unexpected '.', expecting ')' in /home2/navidcs/public_html/4amir.com/wp-content/plugins/mojo-marketplace-wp-plugin/inc/cli-init.php on line 25

My site is based on WordPress, and I have never edited the PHP files, though I have messed around a lot with one of my sub domains, which is also using WordPress, but should not be related to my main domain.

Here is the link to the file that apparently has the error:

https://codeshare.io/Amirak

  • could you check that the code you posted is the contents of that particular file and not a similar plugin from a different subdomain? – khartnett Jan 14 '19 at 23:37

1 Answers1

-2

In PHP, "." is the concatenation operator. Normaly, you can break the line before or after this operator...

Please, try to replace

        'longdesc'  => 'Control the admin interface, default modules and UX for an Endurance hosting brand.' .
                       PHP_EOL . 'Subcommands: update, remove',

by

        'longdesc'  => 'Control the admin interface, default modules and UX for an Endurance hosting brand.' . PHP_EOL . 'Subcommands: update, remove',

and give the new error message.

Lortet
  • 518
  • 4
  • 10
  • 1
    So you've... remove a new line? Is that all? What difference will that make? – Jonnix Jan 14 '19 at 23:23
  • If I understand the error "Parse error: syntax error, unexpected '.', expecting ')' in xxx.php on line 25", the problem can be the final point that would not simply be recognized as an operator. This could be confirmed by the PHP parser waiting for the end of the array')'. To confirm that is the error, after have removed the line break, the same error will appear again at line 31. If it is the error, we need to fine why the concatenation operator is not recognized as an operator. – Lortet Jan 14 '19 at 23:37
  • https://3v4l.org/p0Xpb The newline makes zero difference. It is not an error. – Jonnix Jan 14 '19 at 23:39
  • Jon Stirling I know PHP like you (in my first comment I say normally you can break...) and have also executed the code without error. But in his computer/server, he has an error at this line. That can come from the PHP version/configuration, but to be sure that's the error, I need to know if remove the line break change the error on his computer/server. – Lortet Jan 14 '19 at 23:44
  • So which version / configuration are you saying there is that could cause this with a line break? – Jonnix Jan 15 '19 at 08:48
  • I don't know, I'm not sure that's the problem. We need a confirmation of « Amir ». Personnally, I don't reproduce the error. Did you have ? I just search possibilities with error message and source code. Did you have others ideas ? Can you say I'm in the wrong way ? The problems can be specific to « Amir » and if it is, only answer of Amir will be usefull to find a soluton (or if you reproduce, say It). – Lortet Jan 15 '19 at 09:12
  • I'm only saying that the new line is not the problem. It's something else that we can't see, or isn't being shown to us. – Jonnix Jan 15 '19 at 09:19
  • removing the line break does not change anything. My main question is that how can it have a "bug" in the PHP code, if I have never even opened the file? And can changing some HTML cone on a subdomain of my site (which is using a whole other wordpress installed on it) have an affect on the main domain. – Amir Vafaei Jan 18 '19 at 17:05
  • Does not change anything ? It change the error line number no ? – Lortet Jan 18 '19 at 18:00