Permalink
Browse files

Fixing array to string conversion error on PHP 5.4.

  • Loading branch information...
1 parent f2abe3b commit 88a2d125838655fc855e2c525d298c9031e777e6 @nateabele nateabele committed May 23, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 template/helper/Form.php
View
@@ -597,7 +597,8 @@ protected function _selectOptions(array $list, array $scope) {
}
$selected = (
(is_array($scope['value']) && in_array($value, $scope['value'])) ||
- ((string) $scope['value'] === (string) $value)
+ ($scope['empty'] && empty($scope['value']) && $value === '') ||
+ (is_scalar($scope['value']) && ((string) $scope['value'] === (string) $value))
);
$options = $selected ? array('selected' => true) : array();
$params = compact('value', 'title', 'options');

0 comments on commit 88a2d12

Please sign in to comment.