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

issue using enquireLink #16

Open
davydX opened this issue Mar 11, 2024 · 0 comments
Open

issue using enquireLink #16

davydX opened this issue Mar 11, 2024 · 0 comments

Comments

@davydX
Copy link

davydX commented Mar 11, 2024

Context
try { SmppClient::$smsNullTerminateOctetstrings = false; Socket::$forceIpv4 = true; $transport = new Socket([$server->api_link], $server->port); $transport->setRecvTimeout(30000); $smppClient = new SmppClient($transport); $transport->open(); $smppClient->bindReceiver($server->username, $server->password); $isenquirelink = $smppClient->readSMS(); if (!$isenquirelink ?? false) { $smppClient->enquireLink(); }else{ //receive sms and dlr logic here } } catch (Exception $e) { $output = $e->getMessage(); }

Error

[2024-03-11 10:58:36] production.ERROR: strlen(): Argument -#1 ($string) must be of type string, null given {"exception":"[object] (TypeError(code: 0): strlen(): Argument -#1 ($string) must be of type string, null given at /.../vendor/alexandr-mironov/php8-smpp/src/Client.php:972)
[stacktrace]
-#0 /.../vendor/alexandr-mironov/php8-smpp/src/Client.php(972): strlen()
-#1 /..../vendor/alexandr-mironov/php8-smpp/src/Client.php(944): smpp\Client->sendPDU()
-#2 /.../vendor/alexandr-mironov/php8-smpp/src/Client.php(874): smpp\Client->sendCommand()
-#3 /.../myclass.php(56): smpp\Client->enquireLink()

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

No branches or pull requests

1 participant