On Tue, Feb 11, 2014 at 2:10 PM, Crypto Compress
<[email protected]> wrote:
> No, it's not about risk of abuse. There can be *only* abuse!
> This hook is only intended to hide debug information. If you don't want to
> hide info, you don't need this hook.
> Debug info is *important*! Do not hide it without a option to bypass!
>
That statement is incorrect.
This hook is not only intended to hide debug information. It can just
as easily be used to expose *more* debug information.
For example:
class MyMySQL {
protected $conn;
public function __debugInfo() {
return [
'conn' => $this->conn,
'encoding' => mysql_client_encoding($this->conn),
'error' => mysql_error($this->conn),
'info' => mysql_info($this->conn),
// etc...
}
}
Here, our mysql wrapper class exposes a great deal more information
for use when debugging what went wrong. Not less. Therefore I refute
your statement.
-Sara