Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Make it work with PHP 8.0 #906

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Make it work with PHP 8.0 #906

merged 2 commits into from
Feb 12, 2021

Conversation

shemgp
Copy link
Contributor

@shemgp shemgp commented Jan 14, 2021

method_exists requires first parameter to be object or string now and won't accept a null parameter

method_exists requires first parameter to be object or string now and won't accept a null parameter
@stevebauman
Copy link
Member

Thanks @shemgp! Can you make this into a single if statement? For example:

protected function isTrashed()
{
    return $this->model
        ? method_exists($this->model, 'trashed') && $this->model->trashed()
        : false;
}

I will then merge the PR 👍

@stevebauman stevebauman merged commit 082e863 into Adldap2:master Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants