Development

#6734 (Parsing problem with 08 and 09)

You must first sign up to be able to contribute.

Ticket #6734 (closed defect: invalid)

Opened 9 months ago

Last modified 9 months ago

Parsing problem with 08 and 09

Reported by: raph Assigned to: fabien
Priority: minor Milestone:
Component: yaml Version: 1.2.4
Keywords: Cc:
Qualification: Unreviewed

Description

When loading fixtures with an int column the values with 08 and 09 are replaced by 0. Tested in 1.2.4 with doctrine and propel.

Departement:
  columns:
    num: integer
    name: string(40)
Departement:
  Ain:
    num: 01
    name: Ain
  Ardeche: 
    num: 07
    name: Ardèche
  Ardennes: 
    num: 08
    name: Ardennes
  Ariege: 
    num: 09
    name: Ariège 
  Aube: 
    num: 10
    name: Aube

In the table:

 id 	num 	name
1 	1 	Ain
2 	7 	Ardèche
3 	0 	Ardennes
4 	0 	Ariège
5 	10 	Aube

With 8 or '08' it works but not with 08.

Change History

07/02/09 16:28:18 changed by fabien

  • status changed from new to closed.
  • resolution set to invalid.

In the YAML spec, if a number starts with a 0, it is a number in octal notation.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.