]> git.mxchange.org Git - hub.git/blobdiff - application/hub/exceptions.php
In case of non-blocking connections (and that is for 99.9999% the case here)
[hub.git] / application / hub / exceptions.php
index 226ef6ff524b8a1aba15d76f8884704ddacd8e97..8eefa5ea554366f8fac8de19fb38fe3620982521 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
@@ -33,11 +33,14 @@ function hub_exception_handler ($exceptionInstance) {
                        // Init argument string
                        $argsString = '';
 
-                       // Convert arguments type into human-readable
-                       foreach ($traceArray['args'] as $arg) {
-                               $argsString .= ', ' . gettype($arg);
-                       } // END - foreach
-                       $argsString = substr($argsString, 2);
+                       // Any arguments?
+                       if ((isset($traceArray['args'])) && (is_array($traceArray['args'])) && (count($traceArray['args']) > 0)) {
+                               // Convert arguments type into human-readable
+                               foreach ($traceArray['args'] as $arg) {
+                                       $argsString .= ', ' . gettype($arg);
+                               } // END - foreach
+                               $argsString = substr($argsString, 2);
+                       } // END - if
 
                        // Set missing file/line
                        if (!isset($traceArray['file']))  $traceArray['file']  = 'unknown';