title: Empty property of $mysqli->error on PHP 5.3
body: <p>When I execute sql queries on my php applciation using MySQLi, errors are always empty or null so disabling me from logging or printing them which is rather frustrating... I have not experienced any issues inserting, updating or deleting data with the snippet below when the query is not expected to raise an error.</p>
  <p>I am using PHP 5.3.9 on the community edition of Zend Server 5.6.0 and mysqli mysqlnd 5.0.8-dev - 20102224 - $Revision: 318113 $</p>
  <p>This is the code that executes my queries :</p>
  <pre><code>...
  $this-&gt;last= $this-&gt;mysqli-&gt;query($sql);
  if (!$this-&gt;last) 
  {
      print_r($this-&gt;mysqli);
  
      var_dump($this-&gt;mysqli-&gt;error);
      var_dump($this-&gt;mysqli-&gt;errno);
      var_dump($this-&gt;mysqli);
      $msg = 'Query failed [ ' . $this-&gt;mysqli-&gt;error . ' ]';
  
      $this-&gt;mysqli-&gt;rollback();
      throw new Exception($msg, ...);
  }
  ...
  </code></pre>
  <p>For testing purposes I insterted a city named 'bob' in my database and tried to insert another city with the same name and this is what was printed :</p>
  <pre><code>mysqli Object
  (
      ...
      [errno] =&gt; 1062
      [error] =&gt; Duplicate entry 'bob' for key 'unq_city'
      ...
  )
  string(0) &quot;&quot;
  int(0)
  object(mysqli)#6 (18) {
    ...
    [&quot;errno&quot;]=&gt;
    int(0)
    [&quot;error&quot;]=&gt;
    string(0) &quot;&quot;
    ...
  }
  </code></pre>
  <p>Here using var_dump or accessing the errno or error of my mysqli object is, as I previously stated, null. HOWEVER print_r shows the expected error! What I am doing wrong here? I never used mysqli before and am migrating from oci8 so I hope it's only some stupid mistake.</p>
  <p>I tested my app on an older server, PHP 5.3.8, ZSCE 5.5.0 and mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $ with identical configuration from what I can tell. All dumps and prints showed the entire mysqli data without any empty field!</p>