//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __LINE__ . ']: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
// 'exclude' check
- $isMatching = (((is_null($searchChoice)) || ($isMatching === TRUE)) && ((is_null($searchExclude)) || ($searchExclude != $value)));
+ $isMatching = (((is_null($searchChoice)) || ($isMatching === TRUE)) && (!is_null($searchExclude)) && ($searchExclude != $value));
// Return result
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __LINE__ . ']: key=' . $key . ',value=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
// Read the file
$dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
// Is this an array?
if (is_array($dataArray)) {
foreach ($dataArray as $key => $value) {
// Found one entry?
$isFound = (($isFound === TRUE) && ($searchInstance->isCriteriaMatching($key, $value)));
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
} // END - foreach
// Is all found?
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
if ($isFound === TRUE) {
// Shall we skip this entry?
if ($searchInstance->getSkip() > 0) {