bluerhinos / phpMQTT

a simple php class to connect/publish/subscribe to a MQTT broker
Other
765 stars 461 forks source link

php7.4.3 The error in the version below is reported #116

Open ysw121512 opened 3 years ago

ysw121512 commented 3 years ago


Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 241

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 241

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 247

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 248

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 367

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 368

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 416

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 451

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 451

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 585

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 641

Deprecated: Array and string offset access syntax with curly braces is deprecated in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 643

Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: ��֪������������ in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 150

Warning: stream_socket_client(): unable to connect to tcp://http://192.168.1.166:1883 (php_network_getaddresses: getaddrinfo failed: ��֪������������ ) in D:\workspace\vendor\bluerhinos\phpmqtt\phpMQTT.php on line 150
Fail or time out

anhlephuoc commented 3 years ago

The IP address you used (tcp://http://192.168.1.166:1883) is obviously no good. The "HTTP://" has no business being there! The curly brace indexing is deprecated but is still usable. I assume that will be changed when the code is updated.