We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version Laravel : 8.83.27 Version PHP : 8.2.8
1° Pourquoi j'ai toujours cette erreur lors de l'envoie d'SMS ?
Code :
public function test_global() { // Construct transport and client $transport = new SocketTransport(array('gra.smpp.ovh'),2776); $transport->setRecvTimeout(10000); $smpp = new SmppClient($transport); $tags = []; // Activate binary hex-output of server interaction $smpp->debug = true; $transport->debug = true; // Open the connection $transport->open(); $smpp->bindTransmitter(env('SMPP_LOGIN'),env('SMPP_PASSWORD')); // Prepare message $message = 'H€llo world'; $encodedMessage = GsmEncoder::utf8_to_gsm0338($message); $from = new SmppAddress(env('SMPP_SENDER'),SMPP::TON_ALPHANUMERIC); $to = new SmppAddress(33712345678,SMPP::TON_INTERNATIONAL,SMPP::NPI_E164); // Send $smpp->sendSMS($from,$to,$encodedMessage,$tags); // Close connection $smpp->close(); }
Erreur :
• Tests\Feature\MasterTest > global PHPUnit\Framework\ExceptionWrapper Attempt to read property "body" on bool at vendor/its/php-smpp/src/OnlineCity/SMPP/SmppClient.php:400 396▕ } 397▕ } 398▕ 399▕ $response=$this->sendCommand(SMPP::SUBMIT_SM,$pdu); ➜ 400▕ $body = unpack("a*msgid",$response->body); 401▕ return $body['msgid']; 402▕ } 403▕ 404▕ /**
The text was updated successfully, but these errors were encountered:
1+
Sorry, something went wrong.
Librairie pas compatible avec php8.
Depuis php8 les sockets ne sont plus une ressource mais un objet de type Socket.
Pour patcher faut modifier la fonction isOpen de sockettransport.class.php
public function isOpen() { if ( !(is_resource($this->socket) || $this->socket instanceof \Socket) ) return false;
No branches or pull requests
1° Pourquoi j'ai toujours cette erreur lors de l'envoie d'SMS ?
Code :
Erreur :
The text was updated successfully, but these errors were encountered: