Merge pull request #1181 from nlegoff/fix-status

[3.8.6] Fix status bit offset
This commit is contained in:
Nicolas Le Goff
2014-10-30 21:54:14 +01:00

View File

@@ -1515,7 +1515,7 @@ class API_V1_adapter extends API_V1_Abstract
$status = strrev($status);
$ret = array();
foreach ($databox->get_statusbits() as $bit => $status_datas) {
$ret[] = array('bit' => $bit, 'state' => !!substr($status, ($bit - 1), 1));
$ret[] = array('bit' => $bit, 'state' => !!substr($status, $bit, 1));
}
return $ret;