Changeset 967 for branches/1.2
- Timestamp:
- 02/12/08 00:15:47 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/generator/classes/propel/engine/database/model/Domain.php
r536 r967 247 247 return $this->booleanValue($this->defaultValue); 248 248 } elseif ($this->propelType === PropelTypes::DATE || $this->propelType === PropelTypes::TIME || $this->propelType === PropelTypes::TIMESTAMP) { 249 // Under PHP 5.2.5, using '0000-00-00' as the default value will trigger an exception 250 // so instead of converting it to unix timestamp, we turn it into a null 251 if(preg_match('/^0000-00-00/', $this->defaultValue)) { 252 return null; 253 } 249 254 // DATE/TIME vals need to be converted to integer timestamp 250 255 $ts = strtotime($this->defaultValue);
