Changeset 4500
- Timestamp:
- 06/08/08 21:34:23 (13 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Parser/Spyc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Parser/Spyc.php
r4406 r4500 546 546 $value = NULL; 547 547 } elseif (preg_match ('/^[0-9]+$/', $value)) { 548 // Cheeky change for compartibility with PHP < 4.2.0 549 $value = (int)$value; 548 // Cheeky change for compartibility with PHP < 4.2.0 549 $raw = $value; 550 $value = (int) $value; 551 552 if ((string) $value != (string) $raw) { 553 $value = (string) $raw; 554 } 550 555 } elseif (in_array(strtolower($value), 551 556 array('true', 'on', '+', 'yes', 'y'))) { … … 555 560 $value = false; 556 561 } elseif (is_numeric($value)) { 557 $value = (float)$value; 562 $raw = $value; 563 $value = (float) $value; 564 565 if ((string) $value != (string) $raw) { 566 $value = (string) $raw; 567 } 558 568 } else { 559 569 // Just a normal string, right?