title: suppress 2048 errors in php
body: <p>Ok first, I've been googling for almost 40 minutes and I can't find an answer to my specific issue. I understand that its best to fix errors, but that's not the issue here. </p>
  
  <p>what I need to do is make php NOT report 2048 errors. the reason is, I have inherited a site and I need to setup a shutdown function to catch fatal errors and send me a text message. All of that is fine. however the code is constantly throwing 2048 errors and so when my shutdown function hits the last error thrown is always 2048 and not the actual fatal error. I don't need to turn display errors off as that is not the issue. its the back-end processing that I'm concerned with.</p>
  
  <p>I have tested this by turning error reporting off. when i do that, I get the expected result, but that means I can't log other errors on the server. I just want it to ignore 2048 errors, which I believe are E_STRICT. However my error reporting is only set to E_ERROR and I dont think E_STRICT is included in that. </p>
  
  <p>So, how do I make php completely stop reporting 2048 errors, so they dont override my actual fatal error? But keep E_ERROR, so that I can log other errors on the server... </p>
  
  <p><strong>Edit</strong></p>
  
  <p>this is solved... sort of: </p>
  
  <p>I still don't know how to properly suppress that error or why error_reporting() affects error_get_last. However, the underlying problem of being able to ignore that error while still logging errors on the server is solved. I just left error reporting turned off completely and added error reporting to my shutdown function to manually write the data to the log file. </p>
  
  <p>here's the code I used for all non fatal errors:</p>
  
  <pre><code>        $message="\n[".date('d-M-Y H:i:s',time())."] PHP Notice:  ".$e['message']." in ".$e['file']." on line ".$e['line'];
          $file=dirname(__FILE__) . '/error_log-'.date("m-d-Y").'.txt';
          file_put_contents($file, $message, FILE_APPEND | LOCK_EX);
  </code></pre>
  
  <p>It's not the answer I was looking for, but it solved my problem I'd still be interested in knowing if anyone actually knows how to turn e_strict reporting off so that it doesn't appear in error_get_last(). </p>
  
  <p>Peace.</p>