File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / date / tests / bug67118.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:03:42 2014 UTC (10 years, 2 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

--TEST--
Bug #67118 php-cgi crashes regularly on IIS 7
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
class mydt extends datetime
{
	public function __construct($time = 'now', $tz = NULL, $format = NULL)
	{
		if (!empty($tz) && !is_object($tz)) {
			$tz = new DateTimeZone($tz);
		}

		@parent::__construct($time, $tz);
	}

};

new mydt("Funktionsansvarig rÄdgivning och juridik", "UTC");
--EXPECTF--
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Funktionsansvarig rÄdgivning och juridik) at position 0 (F): The timezone could not be found in the database' in %sbug67118.php:%d
Stack trace:
#0 %sbug67118.php(%d): DateTime->__construct('Funktionsansvar...', Object(DateTimeZone))
#1 %sbug67118.php(%d): mydt->__construct('Funktionsansvar...', 'UTC')
#2 {main}
  thrown in %sbug67118.php on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>