Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4556 | crash | always | 05-16-11 08:01 | 05-20-11 02:17 | |
|
|||||
Reporter: | thr | Platform: | |||
Assigned To: | domdorn | OS: | |||
Priority: | normal | OS Version: | |||
Status: | resolved | Product Version: | 4.0.14 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0004556: date_create with time==null and timezone causes NPE | ||||
Description: |
Calling function date_create (aca. new DateTime(null, $timezone_object ) with null and timezone object causes a NullPointerException. Givin null as time is valid according to php documentation and should be similar to 'now'. (http://www.php.net/manual/de/datetime.construct.php) [^] This works in native php Version PHP 5.3.3-1ubuntu9.5 Sample: <?PHP $timezone_string = 'Europe/London'; $timezone_object = timezone_open( $timezone_string ); $datetime = $date = new DateTime(null, $timezone_object ); echo '1 London: ' . date_format($datetime, DATE_ATOM); $datetime = date_create( null, $timezone_object ); echo '2 London: ' . date_format($datetime, DATE_ATOM); ?> |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
testdate.php [^] (326 bytes) 05-16-11 08:01 0001-Fixing-c-4556-date_create-with-time-null-and-timezon.patch [^] (1,015 bytes) 05-17-11 02:14 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|