Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make $this->_SESSID a number as expected rather than hex #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jimd20i
Copy link

@jimd20i jimd20i commented May 30, 2018

On any recent PHP, sending anything produces a notice like:

PHP Notice: A non well formed numeric value encountered in vendor/opensrs/osrs-toolkit-php/opensrs/Ops.php on line 196

That's because it's trying to add a hex string to a number - because uniqid() in its current form produces hex:

$ php -r'echo uniqid()."\n";'
5b0e9bd2145ce
$

Since the source data for uniqid() is just the timestamp (μs) and OpenSRS is clearly happy with a floating-point number for <msg_id>, directly using the timestamp fixes this.

@developernaren
Copy link

why has this not been merge yet? Any issues with this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants