当我用奏鸣曲更改数据时间时,它返回错误:
DateTime::__construct() expects parameter 1 to be string, object given
这是我的实体:
public function setExpiry($dateAsString = null) {
$this->expiry = new \DateTime($dateAsString);
}
为什么我会收到此错误?
当我用奏鸣曲更改数据时间时,它返回错误:
DateTime::__construct() expects parameter 1 to be string, object given
这是我的实体:
public function setExpiry($dateAsString = null) {
$this->expiry = new \DateTime($dateAsString);
}
为什么我会收到此错误?