zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
- php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
+ if (!php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC)) {
+ ZVAL_NULL(getThis());
+ }
}
zend_restore_error_handling(&error_handling TSRMLS_CC);
}
new mydt("Funktionsansvarig rÄdgivning och juridik", "UTC");
?>
--EXPECTF--
-Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug67118.php on line %d
-Bad date
+Fatal error: Call to a member function format() on a non-object in %sbug67118.php on line %d