Skip to content

Commit

Permalink
fix: php 7.2 deprecation warning (https://forum.getfuelcms.com/discus…
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Jun 22, 2019
1 parent dfb7f9c commit 19fe311
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions fuel/modules/fuel/libraries/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,10 @@ public function optimize($files, $params = array())

if (is_array($file))
{
$path_arr = each($file);
if (!is_numeric($path_arr['key']))
if (!is_numeric(key($file)))
{
$module = $path_arr['key'];
$file = $path_arr['value'];
$module = key($file);
$file = current($file);
}
}

Expand Down
2 changes: 1 addition & 1 deletion fuel/modules/fuel/libraries/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ protected function _render_breadcrumb($menu)
if (is_array($this->home_link))
{
$home_link = each($this->home_link);
$home_anchor = anchor($home_link['key'], $home_link['value']);
$home_anchor = anchor(key($this->home_link), current($this->home_link));
}
else
{
Expand Down

0 comments on commit 19fe311

Please sign in to comment.