hamedramzi / php-transmission-class

Automatically exported from code.google.com/p/php-transmission-class
0 stars 0 forks source link

Suppplied id's have to be integers. Strings do not work #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Does not work:
$t = new TransmissionRPC();
$r = $t->get("26");

but this does:
$r = $t->get(26);
$r = $t->get((int)"26");

Original issue reported on code.google.com by johan.ad...@gmail.com on 5 Jul 2010 at 1:37

GoogleCodeExporter commented 9 years ago
I think an adjustment in the cleanRequestData method is a nice fix.
Something like:

if ( ctype_digit( $value ) ) $data[$key] = (int) $value;

I will add it today, after work ;)

Original comment by johan.ad...@gmail.com on 5 Jul 2010 at 1:39

GoogleCodeExporter commented 9 years ago
Committed r8 which should take care of this.

Original comment by brycied...@gmail.com on 5 Jul 2010 at 10:28

GoogleCodeExporter commented 9 years ago
Hah! You beat me to it, ah well. Nice going with the UTF8 fix.

Original comment by johan.ad...@gmail.com on 5 Jul 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Thanks it was nothing.

Original comment by brycied...@gmail.com on 5 Jul 2010 at 11:55