Skip to content

Mysqli driver raise a lot of warning about Undefined property after connection closed #4021

merged 1 commit into from Mar 11, 2014

5 participants


The problem is in the Mysqli\Connection::Disconnect() that unset property but other methods check it and raise warning. So to fix it just add $this->resource=null; in the end of disconnect method:

public function disconnect()
    if ($this->resource instanceof \mysqli) {
    $this->resource=null; // +++ ADD this string


@digihand it seems that it's done in every Db\Adapter\Driver* different...
Here it's unset(), mostly it's set to null and sometimes it's only disconnected.

maybe @ralphschindler could have a look into it and apply some labels.


@ThaDafinser @digihand maybe the case is like at this PR #5887 ?

@ralphschindler ralphschindler added this to the 2.3.0 milestone Mar 11, 2014
@weierophinney weierophinney added a commit that referenced this pull request Mar 11, 2014
@weierophinney weierophinney Merge branch 'hotfix/4021' into develop
Close #4021
@weierophinney weierophinney merged commit 516094a into zendframework:develop Mar 11, 2014

1 check failed

Details default The Travis CI build could not complete due to an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.