Incorrect Json data formatting when using customVariables #2102
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
worksforme
The issue cannot be reproduced and things work as intended.
Milestone
The key/value pairs of the customVariables are sent in the following format to piwik.php and the PiWik_Tracker_Visit::getCustomVariables procedure:
{"1":"["key","value"]"}
json_decode parses this into:
Array
(
[=> "key","value"
)
But the correct result should be:
Array
(
[1] => Array
(
[0] => key
[1] => value
)
)
The corresponding JSON string after a json_encode of the correct array structure:
{"1":["key","value"]}
(Note the two missing " next to the brackets)
Using:
Firefox: 3.6.13
Php: 5.3.3
The text was updated successfully, but these errors were encountered: