Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序点赞功能提示出错 #13

Open
zjy1100 opened this issue Mar 9, 2018 · 1 comment
Open

小程序点赞功能提示出错 #13

zjy1100 opened this issue Mar 9, 2018 · 1 comment

Comments

@zjy1100
Copy link

zjy1100 commented Mar 9, 2018

安装了最新版的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);
@Laney911
Copy link

点赞和收藏功能可逆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants