brycied00d / PHP-Transmission-Class

PHP Class for the Transmission Daemon RPC interface
http://code.google.com/p/php-transmission-class/
GNU General Public License v3.0
104 stars 47 forks source link

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

Closed brycied00d closed 12 years ago

brycied00d commented 12 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");

Google Code Info: Issue #: 1 Author: johan.ad...@gmail.com Created On: 2010-07-05T13:37:47.000Z Closed On: 2010-07-05T22:28:49.000Z

brycied00d commented 12 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 ;)

Google Code Info: Author: johan.ad...@gmail.com Created On: 2010-07-05T13:39:53.000Z

brycied00d commented 12 years ago

Committed r8 which should take care of this.

Google Code Info: Author: brycied...@gmail.com Created On: 2010-07-05T22:28:49.000Z

brycied00d commented 12 years ago

Hah! You beat me to it, ah well. Nice going with the UTF8 fix.

Google Code Info: Author: johan.ad...@gmail.com Created On: 2010-07-05T23:03:06.000Z

brycied00d commented 12 years ago

Thanks it was nothing.

Google Code Info: Author: brycied...@gmail.com Created On: 2010-07-05T23:55:33.000Z