1

SDK Remote API Issue

Тема: SDK Remote API Issue

Hello.


We have found an error in the sdk (PHP Remote API) when the name of an object carries an & (ampersand) returns error 4 this is solved by making a urlencode to the json object that belongs to params.

Best regards.

2

SDK Remote API Issue

Re: SDK Remote API Issue

Hello cerpas
Thanks for reporting!

I've just updated php-wialon, please check
https://github.com/wialon/php-wialon/co … 2d0012b4ad

Here's my test code

<?
include('wialon/wialon.php');

$wialon_api = new Wialon();

$token = TOKEN;

$result = $wialon_api->login($token);
$json = json_decode($result, true);

$params = array(
    'creatorId' => $json['user']['id'],
    'name'=>"!*'();:@&=+$,/?#[]",
    'hwTypeId'=>13028700, // any HW type
    'dataFlags'=>1
);
$result = $wialon_api->core_create_unit($params);
echo $result;

$wialon_api->core_logout();
?>
3

SDK Remote API Issue

Re: SDK Remote API Issue

Hello thanks for upgrade, works fine.