Skip to content

Commit

Permalink
fixed issue with error displaying from Fuel_auth with $permission[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Oct 10, 2014
1 parent 0c026a5 commit 91f8c9a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fuel/modules/fuel/libraries/Fuel_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,16 @@ public function has_permission($permission, $type = '')
if (is_array($permission))
{
$foreign_module = NULL;
if ((isset($permission[0]) AND $permission[0] != $this->CI->module) AND in_array($permission[0], array_keys($this->CI->fuel->modules->get()))) {
$foreign_module = $permission[0];

if (isset($permission[0]) AND in_array($permission[0], array_keys($this->CI->fuel->modules->get())))
{
// broken out to simplify
if (!isset($this->CI->module) OR (isset($this->CI->module) AND $permission[0] != $this->CI->module))
{
$foreign_module = $permission[0];
}
}

foreach($permission as $key => $val)
{
if (is_int($key) && !empty($this->CI->module))
Expand Down

0 comments on commit 91f8c9a

Please sign in to comment.