mirror of https://gitee.com/karson/fastadmin.git
update application/common/library/SelectPage.php.
新selectpage类中验证字段名是否在允许列表中的方法只验证了数据库表字段,并未验证模型中追加的属性,若要获取模型追加的属性会报参数错误 Signed-off-by: 还俗二师兄 <505097558@qq.com>pull/528/head
parent
b430f058a9
commit
430ee98ab1
|
|
@ -221,7 +221,7 @@ class SelectPage
|
|||
protected function validateField(string $field)
|
||||
{
|
||||
$field = strtolower($field);
|
||||
if (!in_array($field, $this->allowedFields, true)) {
|
||||
if (!in_array($field, $this->allowedFields, true) && !in_array($field, $this->resolveSelectpageFields(), true)) {
|
||||
throw new Exception('Invalid parameters');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue