Skip to content

Commit

Permalink
fixed warnings/errors in latest PHP versions; merge from MOODLE_15_ST…
Browse files Browse the repository at this point in the history
…ABLE
  • Loading branch information
skodak committed Oct 30, 2005
1 parent 7fa92da commit 454727f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion course/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
natcasesort($nonmembers);

if (empty($selectedgroup)) { // Choose the first group by default
if ($selectedgroup = array_shift(array_keys($listgroups))) {
if ($selectedgroup = array_shift($temparr = array_keys($listgroups))) {
$members = $listmembers[$selectedgroup];
}
} else {
Expand Down
5 changes: 1 addition & 4 deletions grade/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@
}

if (empty($selectedgrade_item)) { // Choose the first group by default
// doesn't work with php 5 :(
// $selectedgrade_item = array_shift(array_keys($listgrade_items));
$keys = array_keys($listgrade_items);
$selectedgrade_item = array_shift($keys);
$selectedgrade_item = array_shift($temparr = array_keys($listgrade_items));
}

include('exceptions.html');
Expand Down
2 changes: 1 addition & 1 deletion login/signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

if (!empty($err)) {
$focus = "form.".array_shift(array_flip(get_object_vars($err)));
$focus = "form.".array_shift($temparr = array_flip(get_object_vars($err)));
} else {
$focus = "";
}
Expand Down

0 comments on commit 454727f

Please sign in to comment.