Development

Changeset 33387

You must first sign up to be able to contribute.

Changeset 33387

Show
Ignore:
Timestamp:
03/15/12 13:56:18 (1 year ago)
Author:
fabien
Message:

[1.4] fixed some notices on PHP 5.4 (closes #10010, patch from Tiago.Ribeiro)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.4/lib/widget/sfWidget.class.php

    r22933 r33387  
    44 * This file is part of the symfony package. 
    55 * (c) Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
     
    362362  static public function escapeOnce($value) 
    363363  { 
    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())); 
    365365  } 
    366366 
  • branches/1.4/lib/widget/sfWidgetForm.class.php

    r24137 r33387  
    245245    if (strstr($name, '[')) 
    246246    { 
    247       $name = str_replace(array('[]', '][', '[', ']'), array((null !== $value ? '_'.$value : ''), '_', '_', ''), $name); 
     247      $name = str_replace(array('[]', '][', '[', ']'), array(((null !== $value) && is_string($value) ? '_'.$value : ''), '_', '_', ''), $name); 
    248248    } 
    249249 
     
    331331   * 
    332332   * @return array              The translated texts 
    333    *  
     333   * 
    334334   * @see sfWidgetFormSchemaFormatter::translate() 
    335335   */