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

rpc_version get failed if authentication enabled #19

Closed HiHat closed 11 years ago

HiHat commented 11 years ago

Class constructor invoke rpc_version request before username and password variables initialization.

brycied00d commented 11 years ago

I think you're mistaken. Line 595 initializes the username (and password), and rpc_version is initialized on line 605. https://github.com/brycied00d/PHP-Transmission-Class/blob/master/class/TransmissionRPC.class.php#L595 https://github.com/brycied00d/PHP-Transmission-Class/blob/master/class/TransmissionRPC.class.php#L605

HiHat commented 11 years ago

Hi!

Sorry for my mistake.

There were wrong initialization of class (without passing url, username and password) taken from your test.php

Best regards, Andrey On Nov 6, 2013 12:11 AM, "Bryce Chidester" notifications@github.com wrote:

I think you're mistaken. Line 595 initializes the username (and password), and rpc_version is initialized on line 605.

https://github.com/brycied00d/PHP-Transmission-Class/blob/master/class/TransmissionRPC.class.php#L595

https://github.com/brycied00d/PHP-Transmission-Class/blob/master/class/TransmissionRPC.class.php#L605

— Reply to this email directly or view it on GitHubhttps://github.com/brycied00d/PHP-Transmission-Class/issues/19#issuecomment-27807946 .

brycied00d commented 11 years ago

Ah, fair enough. The tests.php wasn't updated when rpc_version was introduced.