Hello, i have found trouble (or bug maybe) when parseResponse parsing result of my hotspot user profile on-login script
here the result before i parse it
=on-login=/system scheduler add name="remove-user-$user" interval="1d" on-even="/ip hotspot active remove [find user=$user];/ip hotspot user remove [find name=$user];/system scheduler remove [find name=remove-user-$user]"
and after i parse it with parseResponse, parseResponse remove some of the result and it becomes like this
[on-login] => /system scheduler add name
after i try to look into the routeros_api.class.php, i found the problem is because parseResponse() assumed that the regex only had 2 results which are $MATCHES[0][0] and $MATCHES[0][1]. but in my case, the regex have more than 2 results, so the results except $MATCHES[0][0] and $MATCHES[0][1] are ignored.
ps: i'm not sure about my issue title
Hello, i have found trouble (or bug maybe) when parseResponse parsing result of my hotspot user profile on-login script here the result before i parse it
=on-login=/system scheduler add name="remove-user-$user" interval="1d" on-even="/ip hotspot active remove [find user=$user];/ip hotspot user remove [find name=$user];/system scheduler remove [find name=remove-user-$user]"
and after i parse it with parseResponse, parseResponse remove some of the result and it becomes like this[on-login] => /system scheduler add name
after i try to look into the
routeros_api.class.php
, i found the problem is becauseparseResponse()
assumed that the regex only had 2 results which are$MATCHES[0][0]
and$MATCHES[0][1]
. but in my case, the regex have more than 2 results, so the results except$MATCHES[0][0]
and$MATCHES[0][1]
are ignored. ps: i'm not sure about my issue title