Skip to content

Commit

Permalink
BUGFIX: was being passed to foreach without a check to see if it's an…
Browse files Browse the repository at this point in the history
… array or not.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@86202 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Jeremy Warne authored and Sam Minnee committed Feb 2, 2011
1 parent 900812e commit 05c51f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions forms/CheckboxSetField.php
Expand Up @@ -79,6 +79,11 @@ function Field() {

$odd = 0;
$options = '';

if ($source == null) {
$source = array();
$options = "<li>No options available</li>";
}

foreach($source as $index => $item) {
if(is_a($item, 'DataObject')) {
Expand Down

0 comments on commit 05c51f4

Please sign in to comment.