dever %!s(int64=7) %!d(string=hai) anos
pai
achega
b6dea0654d
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      main/src/Home.php

+ 6 - 0
main/src/Home.php

@@ -29,6 +29,12 @@ class Home
 			'm' => $msg,
 			'mi' => $mid
 		);
+		if (!$mid) {
+			$mid = 0;
+		}
+		if (!$msg) {
+			$msg = 0;
+		}
 		$value = '{"c":'.$code.',"f":"'.$from.'","t":"'.$to.'","m":"'.$msg.'","mi":'.$mid.'}';
 
 		//Dever::daemon('api.pub?key=' . $key. '&value=' . $value, 'mqtt');