ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Misc.php
Go to the documentation of this file.
1 <?php
7 namespace Whoops\Util;
8 
9 class Misc
10 {
21  public static function canSendHeaders()
22  {
23  return isset($_SERVER["REQUEST_URI"]) && !headers_sent();
24  }
25 
32  public static function translateErrorCode($error_code)
33  {
34  $constants = get_defined_constants(true);
35  if (array_key_exists('Core' , $constants)) {
36  foreach ($constants['Core'] as $constant => $value) {
37  if (substr($constant, 0, 2) == 'E_' && $value == $error_code) {
38  return $constant;
39  }
40  }
41  }
42  return "E_UNKNOWN";
43  }
44 }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
static translateErrorCode($error_code)
Translate ErrorException code into the represented constant.
Definition: Misc.php:32
static canSendHeaders()
Can we at this point in time send HTTP headers?
Definition: Misc.php:21
Whoops - php errors for cool kids.
Definition: Misc.php:7