From 8128ee309f0f88dbec9b94ed77a59839d324a6a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 25 Jul 2013 00:32:01 +0000 Subject: [PATCH] Added assert() to check if is really an array --- .../node/class_NodeDistributedHashTableDatabaseWrapper.php | 3 +++ 1 file changed, 3 insertions(+) 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]); -- 2.39.5