cast recordKey to string

This commit is contained in:
Wietse Warendorff
2025-04-04 16:01:32 +02:00
parent 2c3b2f5ed4
commit da845f833f
@@ -82,8 +82,9 @@ trait HasCellState
return null;
}
if (array_key_exists($record->getKey(), $this->cachedState)) {
return $this->cachedState[$record->getKey()];
$recordKey = (string) $record->getKey();
if (array_key_exists($recordKey, $this->cachedState)) {
return $this->cachedState[$recordKey];
}
$state = ($this->getStateUsing !== null) ?
@@ -101,7 +102,7 @@ trait HasCellState
$state = $this->getDefaultState();
}
return $this->cachedState[$record->getKey()] = $state;
return $this->cachedState[$recordKey] = $state;
}
public function getStateFromRecord(): mixed