eee
This commit is contained in:
+2
-2
@@ -223,8 +223,8 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
|||||||
*/
|
*/
|
||||||
public function getPrimaryValue(): ?int
|
public function getPrimaryValue(): ?int
|
||||||
{
|
{
|
||||||
if ($this->hasPrimary()) {
|
if ($this->hasPrimary() && isset($this->_oldAttributes[$this->getPrimary()])) {
|
||||||
return (int)$this->_oldAttributes[$this->getPrimary()] ?? null;
|
return (int)$this->_oldAttributes[$this->getPrimary()];
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user