tony2001 / pinba_extension

Pinba PHP extension
http://pinba.org
GNU Lesser General Public License v2.1
84 stars 22 forks source link

The PinbaClient class incorrect work with request_time variable #20

Closed aparkhomenko closed 9 years ago

aparkhomenko commented 9 years ago

Hello,

When I try to use:

php -r '$pc = new PinbaClient(array(ini_get("pinba.server"))); $pc->setRequestTime(0.1);'

I've got the warning Warning: PinbaClient::setRequestTime(): request_time cannot be less than zero in Command line code on line 1

That's because you use: SET_METHOD_NUM(setRequestTime, request_time, float, "d");

As I know php variables use type double but you compare with type float in that macros.

aparkhomenko commented 9 years ago

I did the pull request for this problem: https://github.com/tony2001/pinba_extension/pull/21

Koc commented 9 years ago

@tony2001 looks like this issue can be closed...

tony2001 commented 9 years ago

Weird, I didn't get a notification for this issue. Sure, it can be closed, if the patch fixes it.