On Wed, 7 Dec 2011, Pierre Joye wrote:
> pajoye Wed, 07 Dec 2011 09:03:07 +0000
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=320564
>
> Log: - print_r seems to display 0 or nothing for days, let make that
> test works in both cases, that's not the purpose of this test to test
> print_r
This is actually a bug that I haven't fixed yet. 0 is int 0, and nothing
is false. It should return false, but right now it doesn't. Could you
revert this changes, as there is a real bug in the code (and I'd rather
fix the bug, then hide it with a passing test :)).
>
> Changed paths:
> U php/php-src/branches/PHP_5_3/ext/date/tests/bug48678.phpt
> U
> php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_set-1.phpt
> U php/php-src/branches/PHP_5_4/ext/date/tests/bug48678.phpt
> U php/php-src/trunk/ext/date/tests/bug48678.phpt
>
> Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug48678.phpt
> ===================================================================
> --- php/php-src/branches/PHP_5_3/ext/date/tests/bug48678.phpt 2011-12-07
> 08:39:43 UTC (rev 320563)
> +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug48678.phpt 2011-12-07
> 09:03:07 UTC (rev 320564)
> @@ -6,7 +6,7 @@
> print_r($x);
> $y = unserialize(serialize($x));
> print_r($y);
> ---EXPECT--
> +--EXPECTF--
> DateInterval Object
> (
> [y] => 3
> @@ -16,7 +16,7 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
> DateInterval Object
> (
> @@ -27,5 +27,5 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
>
> Modified:
> php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_set-1.phpt
> ===================================================================
> ---
> php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_set-1.phpt
> 2011-12-07 08:39:43 UTC (rev 320563)
> +++
> php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_set-1.phpt
> 2011-12-07 09:03:07 UTC (rev 320564)
> @@ -1,5 +1,9 @@
> --TEST--
> date_default_timezone_set() function [1]
> +--SKIPIF--
> +<?php
> +if (substr(PHP_OS, 0, 3) == 'WIN') die('skip diff TZ detection on windows.');
> +?>
> --INI--
> date.timezone=
> --FILE--
>
> Modified: php/php-src/branches/PHP_5_4/ext/date/tests/bug48678.phpt
> ===================================================================
> --- php/php-src/branches/PHP_5_4/ext/date/tests/bug48678.phpt 2011-12-07
> 08:39:43 UTC (rev 320563)
> +++ php/php-src/branches/PHP_5_4/ext/date/tests/bug48678.phpt 2011-12-07
> 09:03:07 UTC (rev 320564)
> @@ -6,7 +6,7 @@
> print_r($x);
> $y = unserialize(serialize($x));
> print_r($y);
> ---EXPECT--
> +--EXPECTF--
> DateInterval Object
> (
> [y] => 3
> @@ -16,7 +16,7 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
> DateInterval Object
> (
> @@ -27,5 +27,5 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
>
> Modified: php/php-src/trunk/ext/date/tests/bug48678.phpt
> ===================================================================
> --- php/php-src/trunk/ext/date/tests/bug48678.phpt 2011-12-07 08:39:43 UTC
> (rev 320563)
> +++ php/php-src/trunk/ext/date/tests/bug48678.phpt 2011-12-07 09:03:07 UTC
> (rev 320564)
> @@ -6,7 +6,7 @@
> print_r($x);
> $y = unserialize(serialize($x));
> print_r($y);
> ---EXPECT--
> +--EXPECTF--
> DateInterval Object
> (
> [y] => 3
> @@ -16,7 +16,7 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
> DateInterval Object
> (
> @@ -27,5 +27,5 @@
> [i] => 30
> [s] => 5
> [invert] => 0
> - [days] =>
> + [days] =>%s
> )
>
>
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php