zendframework/zf2 — pull request #4021 by ralphschindler (2014-03-11 17:13:52+00:00)
Title: Mysqli driver raise a lot of warning about Undefined property after connection closed

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->close();
}
unset($this->resource);
$this->resource=null; // +++ ADD this string
}
---