HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
[Solved] Parse error: syntax error, unexpected '[' in class.alias.plugin.php on line 64
As mentioned in the title this is what I get when trying to activate the plugin. When I take out the "[Alias]" in line 64 I can activate the plugin and it seems to work, but it only shows the most recent alias, not a list of all of them.
using 2.0.18.4 (i know it says 2.0.18.8 as a requirement but i think it should work anyways)
i turned off all other plugins but it does not make a difference
any ideas? thanks
Tagged:
1
Comments
could be your version of php or you added an error to sytax, or
I did not test it - I merely looked at the code and guessed.
It is probably not initialzed correctly as an array and it thinks its a string.
you could try (although some say it is slower - i wouldn't be worried about a microsecond if it works).
array_push($NewAliasList, $UserName);
instead of
I'd consider changing this code to this for an experiment
from
to
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine @R_J
I would avoid stuff like this
Instead do
grep is your friend.
@x00
sounds good to me.
It's RJ's plugin not mine. I looked at the code on line 64 and didn't run it it or install it.
it pointed to this line 64. But @fh111 and I were looking at different versions. i looked at an older version apparently.
line 64 - $NewAliasList[] = $UserName; // in the version I had downloaded.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Sorry, don't have time to look at that now. Will try to care for it this weekend
thanks guys for looking into it!
@fh111
let us know if you try any of the code changes, and if they solve your problem
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Did some research and I suppose it is a PHP issue. You are using PHP version < 5.4, I assume. Here's a short extract of the PHP manual "As of PHP 5.4 it is possible to array dereference the result of a function or method call directly."
I'll change the code according to @x00 s suggestion because that should solve your problem, @fh111. Watch out for the new version. I will update it in the next minutes
It's done :-)
Thanks so much for making it work for me! Just tested it and everything works great. Very neat plugin, happy to have that feature