Development

Changeset 10881

You must first sign up to be able to contribute.

Changeset 10881

Show
Ignore:
Timestamp:
08/14/08 10:14:11 (6 years ago)
Author:
hartym
Message:

[1.1] fixes #4158

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/yaml/sfYamlInline.class.php

    r9186 r10881  
    371371        return unserialize(substr($scalar, 13)); 
    372372      case ctype_digit($scalar): 
    373         return '0' == $scalar[0] ? octdec($scalar) : intval($scalar); 
     373        $raw = $scalar; 
     374        $cast = intval($scalar); 
     375        return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); 
    374376      case in_array(strtolower($scalar), array('true', 'on', '+', 'yes', 'y')): 
    375377        return true; 
  • branches/1.1/test/unit/yaml/sfYamlInlineTest.php

    r9186 r10881  
    1111require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 
    1212 
    13 $t = new lime_test(100, new lime_output_color()); 
     13$t = new lime_test(102, new lime_output_color()); 
    1414 
    1515// ::load() 
     
    2929  '.Inf' => -log(0), 
    3030  '-.Inf' => log(0), 
     31  '123456789123456789' => '123456789123456789', 
    3132 
    3233  '2007-10-30' => mktime(0, 0, 0, 10, 30, 2007),