Skip to content

Commit 77a7497

Browse files
committed
fix type error
PHP Fatal error: Uncaught TypeError: substr(): Argument #1 ($string) must be of type string, array given in /var/www/html/plugins/zwavejs/core/class/zwavejs.class.php:2412\nStack trace:\n#0 /var/www/html/plugins/zwavejs/core/class/zwavejs.class.php(2412): substr()\n#1 /var/www/html/core/class/cmd.class.php(1331): zwavejsCmd->execute()\n#2 /var/www/html/core/ajax/cmd.ajax.php(102): cmd->execCmd()\n#3 {main}\n thrown in /var/www/html/plugins/zwavejs/core/class/zwavejs.class.php on line 2412
1 parent 01af468 commit 77a7497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/class/zwavejs.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ public function execute($_options = array()) {
24092409
$eqLogic->setNodeValue($fullPath, $value);
24102410
return;
24112411
}
2412-
if (substr($value, 0, 3) == 'set') {
2412+
if (is_string($value) && substr($value, 0, 3) == 'set') {
24132413
$fullPath = $node . '-' . $cc . '-' . $endpoint . '-' . $property;
24142414
$val = explode('-', $value, 2)[1];
24152415
$eqLogic->setNodeValue($fullPath, $val);

0 commit comments

Comments
 (0)