Permalink
Browse files

try to load a few classes, don't depend on autoloading

  • Loading branch information...
1 parent 06a2890 commit b72089a678ddbd051d1a6cab9f5dd77d3694d5c4 @rich rich committed Apr 9, 2009
Showing with 6 additions and 3 deletions.
  1. +6 −3 Hoptoad.php
View
@@ -1,12 +1,15 @@
<?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
{
public static function errorHandler($code, $message, $file, $line)
{
if ($code == E_STRICT) return;
- $trace = Hoptoad::tracer();
-
+ $trace = Hoptoad::tracer();
Hoptoad::notifyHoptoad(HOPTOAD_API_KEY, $message, $file, $line, $trace, null);
}
@@ -30,7 +33,7 @@ public static function notifyHoptoad($api_key, $message, $file, $line, $trace, $
} else {
$session = array();
}
-
+
$body = array(
'api_key' => $api_key,
'error_class' => $error_class,

0 comments on commit b72089a

Please sign in to comment.