Skip to content

Commit 6a9056e

Browse files
committed
Update phpMQTT.php
1 parent af86c09 commit 6a9056e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

3rdparty/phpmqtt/phpMQTT.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function connect($clean = true, $will = null, $username = null, $password
268268
public function read($int = 8192, $nb = false)
269269
{
270270
$string = '';
271-
$togo = $int;
271+
$togo = (int)$int;
272272

273273
if ($nb) {
274274
return fread($this->socket, $togo);
@@ -277,7 +277,7 @@ public function read($int = 8192, $nb = false)
277277
while (!feof($this->socket) && $togo > 0) {
278278
$fread = fread($this->socket, $togo);
279279
$string .= $fread;
280-
$togo = $int - strlen($string);
280+
$togo = (int)($int - strlen($string));
281281
}
282282

283283
return $string;

0 commit comments

Comments
 (0)