Fixed case of php function

This commit is contained in:
Pascal Borreli 2012-11-09 10:41:41 +00:00
parent da33e7afd3
commit 235250e192

View File

@ -186,7 +186,7 @@ class StubIntlDateFormatter
$argumentError = null; $argumentError = null;
if (version_compare(\PHP_VERSION, '5.3.4', '<') && !is_int($timestamp)) { if (version_compare(\PHP_VERSION, '5.3.4', '<') && !is_int($timestamp)) {
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value '; $argumentError = 'datefmt_format: takes either an array or an integer timestamp value ';
} elseif (version_compare(\PHP_VERSION, '5.3.4', '>=') && !is_int($timestamp) && !$timestamp instanceOf \DateTime) { } elseif (version_compare(\PHP_VERSION, '5.3.4', '>=') && !is_int($timestamp) && !$timestamp instanceof \DateTime) {
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object'; $argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object';
} }
@ -199,7 +199,7 @@ class StubIntlDateFormatter
} }
// As of PHP 5.3.4, IntlDateFormatter::format() accepts DateTime instances // As of PHP 5.3.4, IntlDateFormatter::format() accepts DateTime instances
if (version_compare(\PHP_VERSION, '5.3.4', '>=') && $timestamp instanceOf \DateTime) { if (version_compare(\PHP_VERSION, '5.3.4', '>=') && $timestamp instanceof \DateTime) {
$timestamp = $timestamp->getTimestamp(); $timestamp = $timestamp->getTimestamp();
} }