. Fixed bug #54340 (DateTime::add() method bug). (Adam)
. Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|'
correctly). (Adam)
+ . Fixed bug #54283 (new DatePeriod(NULL) causes crash). (Felipe)
- DBA extension:
. Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe)
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj->current = NULL;
- if (isostr_len) {
+ if (isostr) {
date_period_initialize(&(dpobj->start), &(dpobj->end), &(dpobj->interval), &recurrences, isostr, isostr_len TSRMLS_CC);
if (dpobj->start == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The ISO interval '%s' did not contain a start date.", isostr);
--- /dev/null
+--TEST--
+Bug #54283 (new DatePeriod(NULL) causes crash)
+--FILE--
+<?php
+
+try {
+ var_dump(new DatePeriod(NULL));
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+?>
+--EXPECTF--
+string(51) "DatePeriod::__construct(): Unknown or bad format ()"