thinkcmfapi icon indicating copy to clipboard operation
thinkcmfapi copied to clipboard

小程序点赞功能提示出错

Open zjy1100 opened this issue 7 years ago • 1 comments

安装了最新版的api接口和最新版的小程序v1.0.3 收藏和评论功能都正常使用。 点赞功能提示出错,错误信息: [8] ErrorException in Builder.php line 307 未定义数组下标: 1 protected function parseWhereItem($field, $val, $rule = '', $options = [], $binds = [], $bindName = null) { // 字段分析 $key = $field ? $this->parseKey($field, $options) : '';

    // 查询规则和条件
    if (!is_array($val)) {
        $val = is_null($val) ? ['null', ''] : ['=', $val];
    }
    list($exp, $value) = $val;

    // 对一个字段使用多个查询条件
    if (is_array($exp)) {
        $item = array_pop($val);
        // 传入 or 或者 and
        if (is_string($item) && in_array($item, ['AND', 'and', 'OR', 'or'])) {
            $rule = $item;
        } else {
            array_push($val, $item);

zjy1100 avatar Mar 09 '18 05:03 zjy1100

点赞和收藏功能可逆

Laney911 avatar Apr 26 '18 11:04 Laney911