Browse Source

cast values when comparing.

Taylor Otwell 12 years ago
parent
commit
c9a4f5ea2f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/form.php

+ 1 - 1
laravel/form.php

@@ -446,7 +446,7 @@ class Form {
 		}
 		}
 		else
 		else
 		{
 		{
-			$selected = ($value == $selected) ? 'selected' : null;
+			$selected = ((string) $value == (string) $selected) ? 'selected' : null;
 		}
 		}
 
 
 		$attributes = array('value' => HTML::entities($value), 'selected' => $selected);
 		$attributes = array('value' => HTML::entities($value), 'selected' => $selected);