Page 1 of 1

Missing variables in $event

Posted: Wed May 22, 2019 8:25 am
by ebelair
Hi, I try to use the php lib and parse a mrt file that contain a variable in the query. The variable is named {where}
In the StiHandler()->onBeginProcessData($event) method $event->parameters is empty, is it normal behaviour?
If I manually set the variable like this :

Code: Select all

$event->parameters["where"] = "foobar";
The queryString is not modified.
So, how to handle parameters correctly?

I'm using ultimate 2019.2.3 in demo

Re: Missing variables in $event

Posted: Fri May 24, 2019 9:02 am
by HighAley
Hello.

The first suggestion is to try to rename the variable.
Some reserved names are not available.

How do you use the variable in your query?
What do you get there?

Thank you.

Re: Missing variables in $event

Posted: Fri May 24, 2019 1:15 pm
by ebelair
I could figure out by encrypting the query inside the xml in mrt file (we don't want that the query is publicly visible in the file).
Then I've unencrypted it in the handler and I get the query as it with the {where} inside. So I could set the parameter and the file is working.

Re: Missing variables in $event

Posted: Mon May 27, 2019 6:23 am
by Lech Kulikowski
Hello,

Ok. Please let us know if you need any additional help.

Thank you.