Skip to content

Commit

Permalink
Use sprintf when logging an error
Browse files Browse the repository at this point in the history
Unset $this->_request to get a clean superglobal array everytime

Signed-off-by: Suki <[email protected]>
  • Loading branch information
MissAllSunday committed Feb 16, 2016
1 parent 73aa073 commit add94c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Suki/Ohara.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected function getConfigFile()
if (!file_exists($file))
{
loadLanguage('Errors');
log_error($this->parser($txt['error_bad_file'], array('%1$s' => $file)));
log_error(sprintf($txt['error_bad_file'], $file));

return static::$_config[$this->name] = array();
}
Expand All @@ -204,7 +204,7 @@ protected function getConfigFile()
else
{
loadLanguage('Errors');
log_error($this->parser($txt['error_bad_file'], array('%1$s' => $file)));
log_error(sprintf($txt['error_bad_file'], $file));

return static::$_config[$this->name] = array();
}
Expand Down Expand Up @@ -471,7 +471,11 @@ public function data($var)
if (empty($this->_request))
$this->setData();

return $this->validate($var) ? $this->sanitize($this->_request[$var]) : false;
$r = $this->validate($var) ? $this->sanitize($this->_request[$var]) : false;

unset($this->_request);

return $r;
}

/**
Expand Down

0 comments on commit add94c3

Please sign in to comment.