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

Undefined index: column #38

Open
nguyentranchung opened this issue Dec 8, 2018 · 8 comments
Open

Undefined index: column #38

nguyentranchung opened this issue Dec 8, 2018 · 8 comments
Labels

Comments

@nguyentranchung
Copy link

hi @hootlex
I have encountered this error.

    "message": "Undefined index: column",
    "exception": "ErrorException",
    "file": "...\\vendor\\hootlex\\laravel-moderation\\src\\ModerationScope.php",
    "line": 404,

In ModerationScope.php are you sure always has attribute in $where array

    protected function isModerationConstraint(array $where, $column)
    {
            return $where['column'] == $column;
    }
@nguyentranchung
Copy link
Author

I try

    protected function isModerationConstraint(array $where, $column)
    {
        if (isset($where['column'])) {
            return $where['column'] == $column;
        }
        return false;
    }

I do not know True or False would be better.

@nguyentranchung
Copy link
Author

ping @hootlex

1 similar comment
@dom235
Copy link

dom235 commented May 8, 2019

ping @hootlex

@nguyentranchung
Copy link
Author

@schranzer235 fork repo and fix it. Or using https://github.com/spatie/laravel-model-status package

@dom235
Copy link

dom235 commented May 28, 2019

thanks for your reply! didn't noticed at first

@nguyentranchung
Copy link
Author

@schranzer235 see my pull request #40

@hootlex hootlex added the bug label Oct 20, 2019
@mallchin
Copy link

ping @hootlex

@nikhilbhatia22
Copy link

Facing the same, any update?

RedBlueBulb added a commit to RedBlueBulb/laravel-moderation that referenced this issue May 30, 2021
RedBlueBulb added a commit to RedBlueBulb/laravel-moderation that referenced this issue Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants