Return type of the function processStatusCode for LDT's


#1

The return type of the function processStatusCode is an string??

$status = $mybin->add($event);

echo gettype($status); // gives string
echo gettype($mybin->errorno()); // gives string

This gives an error when comparing to class constants!!

If the value of $status is 1402, it should match with Aerospike\LDT\LDT::ERR_UNIQUE_KEY, but,

$status === Aerospike\LDT\LDT::ERR_UNIQUE_KEY

gives false? Is it intended behavior?

Let me know.

Thanks,


#2

:grimacing: that is indeed a bug, but at least an easy fix…

https://github.com/aerospike/aerospike-client-php/issues/22

Thanks for reporting it in good detail!


#3

I know, fixed it on my end. Also, in LStack.php, the pop, peek functions are not implemented yet.

Have done that, not sure how correct they are.


#4

Great, thanks. I need to go over the state of LDT in the latest server/C-client release and bring the PHP library up to date with it. I’ll get to it in the next few days.


#5

This has been fixed in the PHP client 3.3.10 release.