From: Roland Häder Date: Thu, 25 Jul 2013 00:32:01 +0000 (+0000) Subject: Added assert() to check if is really an array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8128ee309f0f88dbec9b94ed77a59839d324a6a3;p=hub.git Added assert() to check if is really an array --- diff --git a/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php b/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php index 107701591..967941664 100644 --- a/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php @@ -88,6 +88,9 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem // Get an array of all accepted object types $objectList = $nodeInstance->getListFromAcceptedObjectTypes(); + // Make sure this is an array + assert(is_array($objectList)); + // Add public node data $dataSetInstance->addCriteria(self::DB_COLUMN_NODE_MODE , $requestInstance->getRequestElement('mode')); $dataSetInstance->addCriteria(self::DB_COLUMN_EXTERNAL_IP , $ipPort[0]);