Removed 2nd parameter for assert() as this is only available in PHP 5.4.8+ but Mailer...
authorRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 17:18:29 +0000 (17:18 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 31 May 2013 17:18:29 +0000 (17:18 +0000)
12 files changed:
inc/extensions-functions.php
inc/filter/blacklist_filter.php
inc/filter/user_filter.php
inc/functions.php
inc/http-functions.php
inc/libs/transaction_functions.php
inc/modules/admin/admin-inc.php
inc/modules/member/what-order.php
inc/pool-functions.php
inc/sql-functions.php
inc/wrapper-functions.php
inc/xml-functions.php

index caf01774d27168f6bc077ae68acb7e40fc0b6da7..8dfde689bd230f9bc3be134c47b29850ef740518 100644 (file)
@@ -1920,7 +1920,7 @@ function addDropTableSql ($tableName) {
 // Adds a RENAME TABLE stament if 'from' table exist and 'to' table not
 function addRenameTableSql ($fromTable, $toTable) {
        // Make sure both are not the same
 // Adds a RENAME TABLE stament if 'from' table exist and 'to' table not
 function addRenameTableSql ($fromTable, $toTable) {
        // Make sure both are not the same
-       assert($fromTable != $toTable, 'fromTable must be different to toTable (' . $fromTable . ')');
+       assert($fromTable != $toTable);
 
        // Is renaming required?
        if ((ifSqlTableExists($fromTable)) && (!ifSqlTableExists($toTable))) {
 
        // Is renaming required?
        if ((ifSqlTableExists($fromTable)) && (!ifSqlTableExists($toTable))) {
@@ -2060,8 +2060,8 @@ function addSponsorMenuSql ($action, $what, $title, $active, $sort) {
 // Add ALTER TABLE `foo` ADD sql if not found
 function addExtensionAddTableColumnSql ($tableName, $columnName, $columnSql) {
        // Assert on all
 // Add ALTER TABLE `foo` ADD sql if not found
 function addExtensionAddTableColumnSql ($tableName, $columnName, $columnSql) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($columnName)) && (!empty($columnSql)), 'tableName=' . $tableName . ',columnName=' . $columnName . ',columnSql=' . $columnSql);
-       assert($columnName != $columnSql . ',columnName=' . $columnName . ' must be non-equal to columnSql');
+       assert((!empty($tableName)) && (!empty($columnName)) && (!empty($columnSql)));
+       assert($columnName != $columnSql);
 
        // Is the column there?
        if (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $columnName, isInstaller())) {
 
        // Is the column there?
        if (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $columnName, isInstaller())) {
@@ -2079,8 +2079,8 @@ function addExtensionAddTableColumnSql ($tableName, $columnName, $columnSql) {
 // Add ALTER TABLE `foo` ADD INDEX sql if not found
 function addExtensionAddTableIndexSql ($tableName, $indexName, $columnSql) {
        // Assert on all
 // Add ALTER TABLE `foo` ADD INDEX sql if not found
 function addExtensionAddTableIndexSql ($tableName, $indexName, $columnSql) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)), 'tableName=' . $tableName . ',indexName=' . $indexName . ',columnSql=' . $columnSql);
-       assert(($indexName != $columnSql), 'indexName=' . $indexName  . ' must be unequal to columnSql');
+       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)));
+       assert($indexName != $columnSql);
 
        // Is the column there?
        if (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
 
        // Is the column there?
        if (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
@@ -2098,8 +2098,8 @@ function addExtensionAddTableIndexSql ($tableName, $indexName, $columnSql) {
 // Add ALTER TABLE `foo` ADD UNIQUE INDEX sql if not found
 function addExtensionAddTableUniqueSql ($tableName, $indexName, $columnSql) {
        // Assert on all
 // Add ALTER TABLE `foo` ADD UNIQUE INDEX sql if not found
 function addExtensionAddTableUniqueSql ($tableName, $indexName, $columnSql) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)), 'tableName=' . $tableName . ',indexName=' . $indexName . ',columnSql=' . $columnSql);
-       assert($indexName != $columnSql, 'indexName=' . $indexName  . ' must be unequal to columnSql');
+       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)));
+       assert($indexName != $columnSql);
 
        // Is the column there?
        if (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
 
        // Is the column there?
        if (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
@@ -2117,8 +2117,8 @@ function addExtensionAddTableUniqueSql ($tableName, $indexName, $columnSql) {
 // Add ALTER TABLE `foo` ADD FULLTEXT sql if not found
 function addExtensionAddTableFulltextSql ($tableName, $indexName, $columnSql) {
        // Assert on all
 // Add ALTER TABLE `foo` ADD FULLTEXT sql if not found
 function addExtensionAddTableFulltextSql ($tableName, $indexName, $columnSql) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)), 'tableName=' . $tableName . ',indexName=' . $indexName . ',columnSql=' . $columnSql);
-       assert($indexName != $columnSql, 'indexName=' . $indexName  . ' must be unequal to columnSql');
+       assert((!empty($tableName)) && (!empty($indexName)) && (!empty($columnSql)));
+       assert($indexName != $columnSql);
 
        // Is the column there and MyISAM engine? (InnoDB doesn't support FULLTEXT)
        if ((getTableType() == 'MyISAM') && (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller()))) {
 
        // Is the column there and MyISAM engine? (InnoDB doesn't support FULLTEXT)
        if ((getTableType() == 'MyISAM') && (!ifSqlTableIndexExist('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller()))) {
@@ -2136,8 +2136,8 @@ function addExtensionAddTableFulltextSql ($tableName, $indexName, $columnSql) {
 // Add ALTER TABLE `foo` CHANGE sql if not found
 function addExtensionChangeTableColumnSql ($tableName, $fromColumnName, $toColumnName, $columnSql) {
        // Assert on all
 // Add ALTER TABLE `foo` CHANGE sql if not found
 function addExtensionChangeTableColumnSql ($tableName, $fromColumnName, $toColumnName, $columnSql) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($fromColumnName)) && (!empty($toColumnName)) && (!empty($columnSql)), 'tableName=' . $tableName . ',fromColumnName=' . $fromColumnName . ',toColumnName=' . $toColumnName . ',columnSql=' . $columnSql . ' must not be empty.');
-       assert(($fromColumnName != $columnSql) && ($toColumnName != $columnSql), 'tableName=' . $tableName . ',fromColumnName=' . $fromColumnName . ',toColumnName=' . $toColumnName . ',columnSql=' . $columnSql . ' must not be equal.');
+       assert((!empty($tableName)) && (!empty($fromColumnName)) && (!empty($toColumnName)) && (!empty($columnSql)));
+       assert(($fromColumnName != $columnSql) && ($toColumnName != $columnSql));
 
        // Is the column there?
        if ((ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $fromColumnName)) && (($fromColumnName == $toColumnName) || (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $toColumnName, isInstaller())))) {
 
        // Is the column there?
        if ((ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $fromColumnName)) && (($fromColumnName == $toColumnName) || (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $toColumnName, isInstaller())))) {
@@ -2155,7 +2155,7 @@ function addExtensionChangeTableColumnSql ($tableName, $fromColumnName, $toColum
 // Add ALTER TABLE `foo` DROP sql if not found
 function addExtensionDropTableColumnSql ($tableName, $columnName) {
        // Assert on all
 // Add ALTER TABLE `foo` DROP sql if not found
 function addExtensionDropTableColumnSql ($tableName, $columnName) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($columnName)), 'tableName=' . $tableName . ',columnName=' . $columnName . ' must not be empty.');
+       assert((!empty($tableName)) && (!empty($columnName)));
 
        // Is the column there?
        if (ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $columnName, isInstaller())) {
 
        // Is the column there?
        if (ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $columnName, isInstaller())) {
@@ -2173,7 +2173,7 @@ function addExtensionDropTableColumnSql ($tableName, $columnName) {
 // Add ALTER TABLE `foo` DROP INDEX sql if not found
 function addExtensionDropTableIndexSql ($tableName, $indexName) {
        // Assert on all
 // Add ALTER TABLE `foo` DROP INDEX sql if not found
 function addExtensionDropTableIndexSql ($tableName, $indexName) {
        // Assert on all
-       assert((!empty($tableName)) && (!empty($indexName)) . ',tableName=' . $tableName . ',indexName=' . $indexName . ' must not be empty.');
+       assert((!empty($tableName)) && (!empty($indexName)));
 
        // Is the column there?
        if (ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
 
        // Is the column there?
        if (ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $indexName, isInstaller())) {
@@ -2212,8 +2212,8 @@ function addConfigChangeSql ($oldColumnName, $newColumnName, $columnSql) {
  */
 function registerExtensionPointsData ($subject, $columnName, $lockedMode, $paymentMethod) {
        // Assert on all
  */
 function registerExtensionPointsData ($subject, $columnName, $lockedMode, $paymentMethod) {
        // Assert on all
-       assert((!empty($subject)) && (!empty($columnName)) && (!empty($lockedMode)) && (!empty($paymentMethod)), ',subject=' . $subject . ',columnName=' . $columnName . ',lockedMode=' . $lockedMode . ',paymentMethod=' . $paymentMethod . ' must not be empty.');
-       assert((in_array($lockedMode, array('LOCKED', 'UNLOCKED'))) && (in_array($paymentMethod, array('DIRECT', 'REFERRAL'))), ',subject=' . $subject . ',columnName=' . $columnName . ',lockedMode=' . $lockedMode . ',paymentMethod=' . $paymentMethod . ' must be valid.');
+       assert((!empty($subject)) && (!empty($columnName)) && (!empty($lockedMode)) && (!empty($paymentMethod)));
+       assert((in_array($lockedMode, array('LOCKED', 'UNLOCKED'))) && (in_array($paymentMethod, array('DIRECT', 'REFERRAL'))));
 
        // Is the suffix '_ref' not set?
        if (!ifSubjectHasReferralSuffix($subject)) {
 
        // Is the suffix '_ref' not set?
        if (!ifSubjectHasReferralSuffix($subject)) {
index 82cce253ecd5b013a08ad5555d1190a0af39bc0d..edba5885bf2ccb67ab02a6e8d7537aea44fed770 100644 (file)
@@ -100,7 +100,7 @@ function FILTER_CHECK_URL_BLACKLISTED ($filterData) {
 // Filter for logging blacklisted email addresses, is being called from above filter
 function FILTER_LOG_EMAIL_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
 // Filter for logging blacklisted email addresses, is being called from above filter
 function FILTER_LOG_EMAIL_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
-       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'email'), 'filterData[init] must be set, filterData[blacklisted]=' . $filterData['blacklisted']);
+       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'email'));
 
        // @TODO Insert log entry
 
 
        // @TODO Insert log entry
 
@@ -111,7 +111,7 @@ function FILTER_LOG_EMAIL_BLACKLISTED ($filerData) {
 // Filter for logging blacklisted IP addresses, is being called from above filter
 function FILTER_LOG_IP_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
 // Filter for logging blacklisted IP addresses, is being called from above filter
 function FILTER_LOG_IP_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
-       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'ip'), 'filterData[init] must be set, filterData[blacklisted]=' . $filterData['blacklisted']);
+       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'ip'));
 
        // @TODO Insert log entry
 
 
        // @TODO Insert log entry
 
@@ -122,7 +122,7 @@ function FILTER_LOG_IP_BLACKLISTED ($filerData) {
 // Filter for logging blacklisted URLs, is being called from above filter
 function FILTER_LOG_URL_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
 // Filter for logging blacklisted URLs, is being called from above filter
 function FILTER_LOG_URL_BLACKLISTED ($filerData) {
        // Make sure, that required data is there
-       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'url'), 'filterData[init] must be set, filterData[blacklisted]=' . $filterData['blacklisted']);
+       assert((isset($filterData['init_done'])) && ($filterData['blacklisted'] == 'url'));
 
        // @TODO Insert log entry
 
 
        // @TODO Insert log entry
 
index 3653be39047e17fcd32e00f1740ff1f069f8907c..fde26ce488d497b1afdb2faf653c3c01948970b2 100644 (file)
@@ -176,7 +176,7 @@ function FILTER_SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) {
 // Generic filter for updating referral counter of currently detected referral id
 function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
        // Make sure the referral id is detected
 // Generic filter for updating referral counter of currently detected referral id
 function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
        // Make sure the referral id is detected
-       assert(isValidReferralId(), 'isValidReferralId()=false which is not expected.');
+       assert(isValidReferralId());
 
        // Update ref counter, determineReferralId() must already be called before this filter is executed
        sqlQuery('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`={%pipe,getReferralId%} LIMIT 1', __FUNCTION__, __LINE__);
 
        // Update ref counter, determineReferralId() must already be called before this filter is executed
        sqlQuery('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`={%pipe,getReferralId%} LIMIT 1', __FUNCTION__, __LINE__);
@@ -188,7 +188,7 @@ function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
 // Filter for updating sub id records
 function FILTER_UPDATE_USER_SUBID ($filterData) {
        // Make sure the referral id is detected
 // Filter for updating sub id records
 function FILTER_UPDATE_USER_SUBID ($filterData) {
        // Make sure the referral id is detected
-       assert(isValidReferralId(), 'isValidReferralId()=false which is not expected.');
+       assert(isValidReferralId());
 
        // Get sub id and secure it
        $subId = sqlEscapeString(getRequestElement('subid'));
 
        // Get sub id and secure it
        $subId = sqlEscapeString(getRequestElement('subid'));
index 561bbdadf576f00aeef9b519712d8f8a951f48d3..3951c79b5dc55aea98624a7de04b656867f0b710 100644 (file)
@@ -95,7 +95,7 @@ function generatePassword ($length = '0', $exclude = array()) {
        $localAbc = array_diff($GLOBALS['_abc'], $exclude);
 
        // $localAbc must have at least 10 entries
        $localAbc = array_diff($GLOBALS['_abc'], $exclude);
 
        // $localAbc must have at least 10 entries
-       assert(count($localAbc) >= 10, 'localAbc()=' . count($localAbc) . ' is to small.');
+       assert(count($localAbc) >= 10);
 
        // Start creating password
        $password = '';
 
        // Start creating password
        $password = '';
@@ -1412,7 +1412,7 @@ function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $u
                } // END - if
 
                // Make sure entries is not bool, then something went wrong
                } // END - if
 
                // Make sure entries is not bool, then something went wrong
-               assert(!is_bool($entries), 'entries[]=bool which is not expected.');
+               assert(!is_bool($entries));
        } elseif (!empty($filterFunctions[$search])) {
                // Debug mode enabled?
                if (isDebugModeEnabled()) {
        } elseif (!empty($filterFunctions[$search])) {
                // Debug mode enabled?
                if (isDebugModeEnabled()) {
@@ -1430,7 +1430,7 @@ function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $u
                } // END - if
 
                // Make sure entries is not bool, then something went wrong
                } // END - if
 
                // Make sure entries is not bool, then something went wrong
-               assert(!is_bool($entries), 'entries[]=bool which is not expected.');
+               assert(!is_bool($entries));
        }
 
        // Return value
        }
 
        // Return value
@@ -2526,7 +2526,7 @@ function memberEditEntriesConfirm ($tableName, $columns = array(), $filterFuncti
 // Delete rows by given id numbers
 function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = array(FALSE), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array(), $content = array()) {
        // Do this only for members
 // Delete rows by given id numbers
 function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = array(FALSE), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array(), $content = array()) {
        // Do this only for members
-       assert(isMember(), 'isMember()=false which is not expected.');
+       assert(isMember());
 
        // $tableName must be an array
        if ((!is_array($tableName)) || (count($tableName) != 1)) {
 
        // $tableName must be an array
        if ((!is_array($tableName)) || (count($tableName) != 1)) {
@@ -2569,7 +2569,7 @@ function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunc
 // @TODO cacheFiles is not yet supported
 function memberListBuilder ($listType, $tableName, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $rawUserId = array('userid'), $content = array()) {
        // Do this only for logged in member
 // @TODO cacheFiles is not yet supported
 function memberListBuilder ($listType, $tableName, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $rawUserId = array('userid'), $content = array()) {
        // Do this only for logged in member
-       assert(isMember(), 'isMember()=false which is not expected.');
+       assert(isMember());
 
        // Call inner (general) function
        doGenericListBuilder('member', $listType, $tableName, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $rawUserId, $content);
 
        // Call inner (general) function
        doGenericListBuilder('member', $listType, $tableName, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $rawUserId, $content);
@@ -2647,7 +2647,7 @@ function caluculateTimeUnitValue ($seconds, $timeUnit) {
 // "Getter" for an array from given one but only one index of it
 function getArrayFromArrayIndex ($array, $key) {
        // Some simple validation
 // "Getter" for an array from given one but only one index of it
 function getArrayFromArrayIndex ($array, $key) {
        // Some simple validation
-       assert(isset($array[0][$key]), 'array[0][' . $key . '] is not set.');
+       assert(isset($array[0][$key]));
 
        // Init new array
        $newArray = array();
 
        // Init new array
        $newArray = array();
index 727211d59b834ca789d0d2b9023f52344dde1a7f..4fc66c95a5a94a4850f1af9106d3a284b9e34ace 100644 (file)
@@ -545,7 +545,7 @@ function unchunkHttpResponse ($response) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isChunked=' . intval($isChunked));
        if ($isChunked === TRUE) {
                // Make sure, that body is an array
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isChunked=' . intval($isChunked));
        if ($isChunked === TRUE) {
                // Make sure, that body is an array
-               assert(is_array($body), 'body[]=' . gettype($body) . ' must be an array.');
+               assert(is_array($body));
 
                // Good, we still have the HTTP headers in there, so we need to get rid
                // of them temporarly
 
                // Good, we still have the HTTP headers in there, so we need to get rid
                // of them temporarly
index 4422754cf3ca01f344bde3ba03f6b9965a264226..26839aa6bb044477c4ee99a28385c880edba2039 100644 (file)
@@ -86,7 +86,7 @@ function logTransaction ($sender, $receiver, $level, $valueAmount, $originalAmou
        );
 
        // Should work
        );
 
        // Should work
-       assert(isValidId(getSqlInsertId()), 'getSqlInsertId() is not valid id number.');
+       assert(isValidId(getSqlInsertId()));
 }
 
 // Calculates transaction fee for sender amount
 }
 
 // Calculates transaction fee for sender amount
@@ -137,7 +137,7 @@ function generateHashFromTransactionData (array &$data, $oldHash = '') {
 // "Getter" for CAPTCHA code from given transaction id
 function getCaptchaCodeFromTransactionId ($transactionId) {
        // Must be valid
 // "Getter" for CAPTCHA code from given transaction id
 function getCaptchaCodeFromTransactionId ($transactionId) {
        // Must be valid
-       assert(isValidId($transactionId), 'transactionId=' . $transactionId . ' is not valid id number.');
+       assert(isValidId($transactionId));
 
        // Default is NULL
        $code = NULL;
 
        // Default is NULL
        $code = NULL;
@@ -319,7 +319,7 @@ LIMIT %s",
                        ), $allowed, '', FALSE);
 
                        // Should always work
                        ), $allowed, '', FALSE);
 
                        // Should always work
-                       assert($updated === TRUE, 'Nothing has been updated which is not expected.');
+                       assert($updated === TRUE);
                } // END - if
        } // END - if
 
                } // END - if
        } // END - if
 
@@ -347,7 +347,7 @@ LIMIT %s",
                );
 
                // Should always work
                );
 
                // Should always work
-               assert(sqlAffectedRows() == count($failedIds), 'sqlAffectedRows()=' . sqlAffectedRows() . ',failedIds()=' . count($failedIds));
+               assert(sqlAffectedRows() == count($failedIds));
        } // END - if
 
        // Return status
        } // END - if
 
        // Return status
@@ -357,7 +357,7 @@ LIMIT %s",
 // Checks whether the given user has a fee exempt
 function ifUserHasTransactionFeeExempt ($username) {
        // Accept only valid ids
 // Checks whether the given user has a fee exempt
 function ifUserHasTransactionFeeExempt ($username) {
        // Accept only valid ids
-       assert(isValidId($username), 'username=' . $username . ' which is not a valid id number.');
+       assert(isValidId($username));
 
        // Is there "cache"?
        if (!isset($GLOBALS[__FUNCTION__][$username])) {
 
        // Is there "cache"?
        if (!isset($GLOBALS[__FUNCTION__][$username])) {
index 075242b2fddc48f942a013b833b8152235f3e418..078108d8f464f1e64958f21398e4fb67653857ee 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 // Register an administrator account
 function addAdminAccount ($adminLogin, $passHash, $adminEmail, $accessLevel = 'deny') {
        // Only let valid data pass
 // Register an administrator account
 function addAdminAccount ($adminLogin, $passHash, $adminEmail, $accessLevel = 'deny') {
        // Only let valid data pass
-       assert(in_array($accessLevel, array('allow', 'deny')), 'accessLevel=' . $accessLevel . ', should be one of allow/deny.');
+       assert(in_array($accessLevel, array('allow', 'deny')));
 
        // Login does already exist
        $ret = 'already';
 
        // Login does already exist
        $ret = 'already';
@@ -1606,7 +1606,7 @@ function doAdminProcessMenuWeightning ($type, $AND) {
 // Function to register first admin
 function registerFirstAdmin () {
        // Make sure that no admin is registered
 // Function to register first admin
 function registerFirstAdmin () {
        // Make sure that no admin is registered
-       assert(!isAdminRegistered(), 'isAdminRegistered()=false which is not expected.');
+       assert(!isAdminRegistered());
 
        // Admin is not registered so we have to inform the user
        if ((isFormSent('add_first_admin')) && ((!isPostRequestElementSet('admin_login')) || (!isPostRequestElementSet('admin_password1')) || (strlen(postRequestElement('admin_password1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestElementSet('admin_password2')) || (strlen(postRequestElement('admin_password2')) < getConfig('minium_admin_pass_length')) || (postRequestElement('admin_password1') != postRequestElement('admin_password2')))) {
 
        // Admin is not registered so we have to inform the user
        if ((isFormSent('add_first_admin')) && ((!isPostRequestElementSet('admin_login')) || (!isPostRequestElementSet('admin_password1')) || (strlen(postRequestElement('admin_password1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestElementSet('admin_password2')) || (strlen(postRequestElement('admin_password2')) < getConfig('minium_admin_pass_length')) || (postRequestElement('admin_password1') != postRequestElement('admin_password2')))) {
index b064c4cb7a4c36564795579f0800c2255dc94c81..6f3bc4fc4d545245cf091ade63c420d024cc7ad6 100644 (file)
@@ -263,7 +263,7 @@ LIMIT 1",
                                }
 
                                // Make sure only valid id numbers can pass
                                }
 
                                // Make sure only valid id numbers can pass
-                               assert(isValidId($data['id']), 'data[id]=' . $data['id'] . ' is not a valid id number.');
+                               assert((isset($data['id'])) && (isValidId($data['id'])));
 
                                // Id is received so we can redirect the user, used points will be added when he send's out the mail
                                $data['url'] = 'modules.php?module=frametester&amp;order=' . bigintval($data['id']);
 
                                // Id is received so we can redirect the user, used points will be added when he send's out the mail
                                $data['url'] = 'modules.php?module=frametester&amp;order=' . bigintval($data['id']);
index 08490fb27f00e15f8b56ed40fae9788e3046bd22..1bfc33bfc48411f2ff0bfe8ac99942f7977b45b3 100644 (file)
@@ -85,7 +85,7 @@ function updatePoolDataById ($poolId, $columnName, $data, $updateMode = NULL, $w
        // Is update mode set?
        if (!is_null($updateMode)) {
                // Don't allow array as data here
        // Is update mode set?
        if (!is_null($updateMode)) {
                // Don't allow array as data here
-               assert(!is_array($data), 'data must not be an array.');
+               assert(!is_array($data));
 
                // Then use this on the column with this mode (mostly counters)
                sqlQueryEscaped('UPDATE `{?_MYSQL_PREFIX?}_pool` SET `%s`=`%s`%s%s WHERE `id`=%s' . $whereSql . ' LIMIT 1',
 
                // Then use this on the column with this mode (mostly counters)
                sqlQueryEscaped('UPDATE `{?_MYSQL_PREFIX?}_pool` SET `%s`=`%s`%s%s WHERE `id`=%s' . $whereSql . ' LIMIT 1',
index 503197b38f86a7d027f9371d89bcf989199a67b2..8e64bc0df012e5c1d258e29f92badb7f0fae0acd 100644 (file)
@@ -755,7 +755,7 @@ function getArrayFromSupportedSqlEngines ($requestedEngine = 'ALL') {
 // "Getter" for result from given table and field/type LIKEs
 function sqlGetResultFromLikeColumnsType ($tableName, $field, $type) {
        // The table should be there
 // "Getter" for result from given table and field/type LIKEs
 function sqlGetResultFromLikeColumnsType ($tableName, $field, $type) {
        // The table should be there
-       assert(ifSqlTableExists($tableName), 'tableName=' . $tableName . ' does not exist. field=' . $field . ',type=' . $type);
+       assert(ifSqlTableExists($tableName));
 
        // Default no field set
        $fieldSql = '';
 
        // Default no field set
        $fieldSql = '';
index c5aea2d344f62861eb17bf735393416d712a1649..191b6164cac929610548a35e7c06891e0eb25a78 100644 (file)
@@ -3491,9 +3491,9 @@ function translateFullComma ($dotted) {
 // Wrapper to check if the first element to be shifted is set to given value
 function shift_array (&$array, $value, $key = '0') {
        // Is the element set and value matches?
 // Wrapper to check if the first element to be shifted is set to given value
 function shift_array (&$array, $value, $key = '0') {
        // Is the element set and value matches?
-       assert(is_array($array), 'array[]=' . gettype($array), ',expected: array');
-       assert(isset($array[$key]), 'array[' . $key . '] not set.');
-       assert(($array[$key] === $value), ',array[' . $key . ']=' . $array[$key] . ',value=' . $value);
+       assert(is_array($array));
+       assert(isset($array[$key]));
+       assert($array[$key] === $value);
 
        // Shift it
        array_shift($array);
 
        // Shift it
        array_shift($array);
index 54b494418b6bb31f0e95492ba8c6517400660cd1..0228d8f528cd5afe3af34844c55ae4a368080f39 100644 (file)
@@ -308,7 +308,7 @@ function getSqlPartFromXmlArray ($columns) {
        // Walk through all entries
        foreach ($columns as $columnArray) {
                // Must be an array
        // Walk through all entries
        foreach ($columns as $columnArray) {
                // Must be an array
-               assert(is_array($columnArray), 'columnArray[]=' . gettype($columnArray) . ' must be an array.');
+               assert(is_array($columnArray));
 
                // Init SQL part
                $sqlPart = '';
 
                // Init SQL part
                $sqlPart = '';
@@ -462,7 +462,7 @@ function searchXmlArray ($value, $columns, $childKey) {
        // Walk through whole array
        foreach ($columns as $key => $columnArray) {
                // Make sure the element is there
        // Walk through whole array
        foreach ($columns as $key => $columnArray) {
                // Make sure the element is there
-               assert(isset($columnArray[$childKey]), 'columnArray[' . $childKey . '] is not set.');
+               assert(isset($columnArray[$childKey]));
 
                // Now is it what we are looking for?
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',key=' . $key . ',childKey=' . $childKey . ',columnArray=' . $columnArray[$childKey]);
 
                // Now is it what we are looking for?
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',key=' . $key . ',childKey=' . $childKey . ',columnArray=' . $columnArray[$childKey]);