Browse Source

Merge pull request #60 from cekdahl/master

Fix issue with messages
develop v2.3.2
Emre Akay 10 years ago
parent
commit
902a24854e
  1. 19
      application/libraries/Aauth.php

19
application/libraries/Aauth.php

@ -111,8 +111,8 @@ class Aauth {
$this->aauth_db = $this->CI->load->database($this->config_vars['db_profile'], TRUE); $this->aauth_db = $this->CI->load->database($this->config_vars['db_profile'], TRUE);
// load error and info messages from flashdata (but don't store back in flashdata) // load error and info messages from flashdata (but don't store back in flashdata)
$this->errors = $this->CI->session->flashdata('errors'); $this->errors = $this->CI->session->flashdata('errors') ?: array();
$this->infos = $this->CI->session->flashdata('infos'); $this->infos = $this->CI->session->flashdata('infos') ?: array();
} }
@ -1866,17 +1866,9 @@ class Aauth {
* @return array Array of messages, empty array if no errors * @return array Array of messages, empty array if no errors
*/ */
public function get_errors_array() public function get_errors_array()
{
if (!count($this->errors)==0)
{ {
return $this->errors; return $this->errors;
} }
else
{
return array();
}
}
/** /**
* Print Errors * Print Errors
@ -1961,16 +1953,9 @@ class Aauth {
* @return array Array of messages, empty array if no errors * @return array Array of messages, empty array if no errors
*/ */
public function get_infos_array() public function get_infos_array()
{
if (!count($this->infos)==0)
{ {
return $this->infos; return $this->infos;
} }
else
{
return array();
}
}
/** /**

Loading…
Cancel
Save