Skip to content

Commit

Permalink
try to load a few classes, don't depend on autoloading
Browse files Browse the repository at this point in the history
  • Loading branch information
rich committed Apr 9, 2009
1 parent 06a2890 commit b72089a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Hoptoad.php
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php <?php
if (!class_exists('HTTP_Request')) require_once('HTTP/Request.php');
if (!class_exists('Horde_Yaml')) require_once('Horde/Yaml.php');
if (!class_exists('Horde_Yaml_Dumper')) require_once('Horde/Yaml/Dumper.php');

class Hoptoad class Hoptoad
{ {
public static function errorHandler($code, $message, $file, $line) public static function errorHandler($code, $message, $file, $line)
{ {
if ($code == E_STRICT) return; if ($code == E_STRICT) return;


$trace = Hoptoad::tracer(); $trace = Hoptoad::tracer();

Hoptoad::notifyHoptoad(HOPTOAD_API_KEY, $message, $file, $line, $trace, null); Hoptoad::notifyHoptoad(HOPTOAD_API_KEY, $message, $file, $line, $trace, null);
} }


Expand All @@ -30,7 +33,7 @@ public static function notifyHoptoad($api_key, $message, $file, $line, $trace, $
} else { } else {
$session = array(); $session = array();
} }

$body = array( $body = array(
'api_key' => $api_key, 'api_key' => $api_key,
'error_class' => $error_class, 'error_class' => $error_class,
Expand Down

0 comments on commit b72089a

Please sign in to comment.