-
Notifications
You must be signed in to change notification settings - Fork 460
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
PHP8 Updates #123
Comments
You may need a patch Modify composer.json as follows, and then execute composer update
|
Thank for reply. When I make composer update, I get Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/politsin/snipets/master/patch/mqtt-php8.patch error. And dont change anythings. |
Try composer install and |
I added "cweagans/composer-patches": "^1.6" package already. But I take a error. I didn't understand. And I did manual update MQTT class. |
phpMQTT.php class does not work in PHP8 version. Because Array and string offset access syntax with curly braces is deprecated. When I change deprecated line to [-] characters give a empty string error. I added a small control code in connect function. And this class is working for me.
I make this.
//Check String variable Start
if(empty($string)){
$this->_errorMessage(
sprintf(
"Connection failed!\n"
)
);
return false;
}
// Check String Variable End
The text was updated successfully, but these errors were encountered: