[DC-936] json schema import broken Created: 22/Nov/10 Updated: 22/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | File Parser |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mael Nison | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.3-1ubuntu9.1 |
||
| Attachments: |
|
| Description |
|
With a valid Json file : It's due to this line, line, in Doctrine/Parser/Json.php (#65) : It should be: Because casting the result as array will only affect the top-level element. You must use the second parameter of json_decode() to force every objects (including sub-objects) to be converted to indexed arrays. |
| Comments |
| Comment by Mael Nison [ 22/Nov/10 ] |
|
A try to import this file should fail. |
| Comment by Brian Fenton [ 22/Dec/10 ] |
|
I've submitted a pull request w/patch and unit test for this issue using the fix above. I had the same problem in my code on OS X 10.6.4, PHP 5.3.2 |