]> git.mxchange.org Git - hub.git/commitdiff
Use constants TRUE/FALSE/NULL instead of keywords true/false/null
authorRoland Häder <roland@mxchange.org>
Thu, 18 Jul 2013 12:22:51 +0000 (12:22 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 18 Jul 2013 12:22:51 +0000 (12:22 +0000)
application/hub/exceptions.php
application/hub/main/dht/class_BaseDht.php

index ed80b25d53bf563d2c7e5fd9d62d99abb075c727..a6ca43ce1f337532c3e14d4e7cbcc8279854b23b 100644 (file)
@@ -130,11 +130,11 @@ function __assertHandler ($file, $line, $code) {
 set_exception_handler('hub_exception_handler');
 
 // Init assert handling
-assert_options(ASSERT_ACTIVE,     true);
-assert_options(ASSERT_WARNING,    false);
-assert_options(ASSERT_BAIL,       false);
-assert_options(ASSERT_QUIET_EVAL, false);
-assert_options(ASSERT_CALLBACK,   '__assertHandler');
+assert_options(ASSERT_ACTIVE    , TRUE);
+assert_options(ASSERT_WARNING   , FALSE);
+assert_options(ASSERT_BAIL      , TRUE);
+assert_options(ASSERT_QUIET_EVAL, FALSE);
+assert_options(ASSERT_CALLBACK  , '__assertHandler');
 
 // [EOF]
 ?>
index 8ccf5b0817da9581cda29657d6b68deead9672ce..691f12035c55ec8fd7a83ca1a2fdf358d6de77fa 100644 (file)
@@ -108,6 +108,9 @@ abstract class BaseDht extends BaseHubSystem {
                // Get next node data from stack
                $nodeData = $this->getStackerInstance()->popNamed(self::STACKER_NAME_INSERT_NODE);
 
+               // Make sure $nodeData is really an array and has at least one entry
+               assert((is_array($nodeData)) && (count($nodeData) > 0));
+
                // Insert the data
                $this->insertDataIntoDht($nodeData);
        }