Fixed onload_hooks[] being initted to null after runOnloadHooks() called (should now be initted to an array)
authorDan
Sun, 05 Jul 2009 00:57:53 -0400
changeset 1034 15fa1b4e730a
parent 1033 99bff0df45fa
child 1035 d0d617124b29
Fixed onload_hooks[] being initted to null after runOnloadHooks() called (should now be initted to an array)
includes/clientside/static/enano-lib-basic.js
includes/http.php
--- a/includes/clientside/static/enano-lib-basic.js	Sun Jul 05 00:57:02 2009 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Sun Jul 05 00:57:53 2009 -0400
@@ -210,7 +210,7 @@
       _f(e);
     }
   }
-  onload_hooks = null;
+  onload_hooks = [];
 }
 
 var enano_hooks = {};
@@ -311,7 +311,7 @@
     if ( ajax.readyState == 4 && ajax.status == 200 )
     {
       if ( onload_complete )
-        onload_hooks = new Array();
+        onload_hooks = [];
       eval_global(ajax.responseText);
       if ( window.jQuery && aclDisableTransitionFX )
         if ( window.jQuery.fx )
@@ -327,6 +327,7 @@
     load_hide_win();
     console.info("Component loader exception is shown below.");
     console.debug(e);
+    console.trace();
     throw('load_component(): XHR for component ' + file + ' failed');
   }
   
--- a/includes/http.php	Sun Jul 05 00:57:02 2009 -0400
+++ b/includes/http.php	Sun Jul 05 00:57:53 2009 -0400
@@ -326,9 +326,9 @@
   function _sock_open(&$connection)
   {
     // Open connection
-    $connection = @fsockopen($this->host, $this->port);
+    $connection = fsockopen($this->host, $this->port, $errno, $errstr);
     if ( !$connection )
-      throw new Exception(__METHOD__ . ': Could not make connection');
+      throw new Exception(__METHOD__ . ": Could not make connection"); // to {$this->host}:{$this->port}: error $errno: $errstr");
     
     // 1 = socket open
     $this->state = 1;