Changeset 33387
- Timestamp:
- 03/15/12 13:56:18 (1 year ago)
- Files:
-
- branches/1.4/lib/widget/sfWidget.class.php (modified) (2 diffs)
- branches/1.4/lib/widget/sfWidgetForm.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.4/lib/widget/sfWidget.class.php
r22933 r33387 4 4 * This file is part of the symfony package. 5 5 * (c) Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 362 362 static public function escapeOnce($value) 363 363 { 364 return self::fixDoubleEscape(htmlspecialchars( (string) $value, ENT_QUOTES, self::getCharset()));364 return self::fixDoubleEscape(htmlspecialchars(is_string($value) ? (string) $value : null, ENT_QUOTES, self::getCharset())); 365 365 } 366 366 branches/1.4/lib/widget/sfWidgetForm.class.php
r24137 r33387 245 245 if (strstr($name, '[')) 246 246 { 247 $name = str_replace(array('[]', '][', '[', ']'), array(( null !== $value? '_'.$value : ''), '_', '_', ''), $name);247 $name = str_replace(array('[]', '][', '[', ']'), array(((null !== $value) && is_string($value) ? '_'.$value : ''), '_', '_', ''), $name); 248 248 } 249 249 … … 331 331 * 332 332 * @return array The translated texts 333 * 333 * 334 334 * @see sfWidgetFormSchemaFormatter::translate() 335 335 */