title: PHP try-catch not working
body: <pre><code>try     
  {
      $matrix = Query::take("SELECT moo"); //this makes 0 sense
  
      while($row = mysqli_fetch_array($matrix, MYSQL_BOTH)) //and thus this line should be an error
      {
  
      }
  
      return 'something';
  }
  catch(Exception $e)
  {
      return 'nothing';   
  }
  </code></pre>
  
  <p>However instead of just going to catch part and returning <code>nothing</code> it shows a warning <code>Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given</code> in the line starting with <code>while</code>. I have never came up to using exceptions in php, but used them a lot in C# and it seems in PHP they are working differently or, as always, I am missing something obvious. </p>