think-orm
think-orm copied to clipboard
db before_select 事件的重大bug,无解不能执行下去
before_select事件返回的一定是数组,因为Event类的diaptch,没有加once参数,方法返回的一定是数组. 而执行事件使用的是
if (!$resultSet)
判断结果一定是false,导致真正的查询没有调用
`$resultSet = $this->db->trigger('before_select', $query);
if (!$resultSet) {
// 执行查询操作
$resultSet = $this->pdoQuery($query, function ($query) {
return $this->builder->select($query);
});
}`