private function verifyWhitelist() { $this->whitelist = TRAITS\Whitelist::getWhitelist_CreateAccount($this->formType, $this->invisibleCAPTCHA); if (sizeof($_POST) === sizeof($this->whitelist)) { foreach ($this->whitelist as $key) { if (!in_array($key, array_keys($_POST))) { //One of the fields are missing. Fail. Save error to log. $logMessage = new \Curator\Application\Log(__CLASS__, __METHOD__); $logMessage->saveHazard(LANG\HAZARD_VALIDATE_WHITELIST_FIELD . $key); return FALSE; } } //The $_POST data is valid. Pass. return TRUE; } //The $_POST and $whitelist sizes are different. Fail. Save error to log. $logMessage = new \Curator\Application\Log(__CLASS__, __METHOD__); $logMessage->saveHazard(LANG\HAZARD_VALIDATE_WHITELIST_COUNT); return FALSE; }
public function executeQuery() { if (empty($this->preparedStatement) || empty($this->preparedStatement->execute())) { $logMessage = new \Curator\Application\Log(__CLASS__, __METHOD__); $logMessage->saveError(LANG\ERROR_EXECUTE); } }