Commit Graph

367 Commits

Author SHA1 Message Date
Sara Golemon
1faddd15d9 Add UConverter class (ICU's UConverter API)
RFC at http://wiki.php.net/rfc/uconverter
2013-01-29 19:05:14 +01:00
Anatoliy Belsky
36fadde72c Fixed ext/intl/tests/timezone_createDefault_basic.phpt
Timezone offsets can be negative
2012-11-15 14:31:55 +01:00
Gustavo Lopes
dacd11ea89 Fixed cloning in ext/intl classes; master specific 2012-08-26 23:44:54 +02:00
Gustavo Lopes
befe4ab479 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed defective cloning in ext/intl classes
  NEWS for commit 72c807a
  Allow Spoofchecker to be registered on ICU 49.1
  Announce on NEWS change in 1ce572c
2012-08-26 23:42:57 +02:00
Gustavo Lopes
886a50a619 Fixed defective cloning in ext/intl classes
See also bug #62915
2012-08-26 23:42:13 +02:00
Gustavo Lopes
72c807ad67 Allow Spoofchecker to be registered on ICU 49.1 2012-08-26 23:39:04 +02:00
Gustavo Lopes
1ce572ce2c Bug #62933: compilation error with ICU 3.4 2012-08-26 21:57:53 +02:00
Gustavo Lopes
e95ad46186 Relax 4 dateformat tests for ICU 4.8 2012-08-26 20:42:54 +02:00
Gustavo André dos Santos Lopes
d9f5b1e9bc Merge branch '5.4'
* 5.4:
  Fix SPOOFCHECKER_METHOD_FETCH_OBJECT definition
2012-08-23 10:33:13 +01:00
Gustavo André dos Santos Lopes
d212a5d391 Fix SPOOFCHECKER_METHOD_FETCH_OBJECT definition 2012-08-23 10:32:05 +01:00
Felipe Pena
058e2947fa Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed ZTS build
2012-08-22 19:40:05 -03:00
Felipe Pena
b98fc4379f - Fixed ZTS build 2012-08-22 19:39:57 -03:00
Gustavo Lopes
b9eae3d67c Fix handling of several uinitialized intl objects
Master specific changes. Not having this in the merge commit helps
porting to pecl/intl
2012-08-22 22:54:43 +02:00
Gustavo Lopes
fcd4420dbf Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix handling of several uinitialized intl objects
  Fix handling of several uinitialized intl objects
  - Fix NEWS
  - BFN

Conflicts:
	ext/intl/dateformat/dateformat.c
2012-08-22 22:53:07 +02:00
Gustavo Lopes
cd1f45b3be Fix handling of several uinitialized intl objects
PHP 5.4 specific changes. Not having this in the merge commit helps
porting to pecl/intl
2012-08-22 22:38:31 +02:00
Gustavo Lopes
87803ace94 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix handling of several uinitialized intl objects
2012-08-22 22:37:52 +02:00
Gustavo Lopes
a5d0c1e21b Fix handling of several uinitialized intl objects 2012-08-22 22:32:51 +02:00
Xinchen Hui
f8d9cabd11 Merge branch 'PHP-5.4' 2012-08-21 15:23:53 +08:00
Xinchen Hui
c1284f21a7 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-21 15:23:09 +08:00
Reeze Xia
0cdc1f5626 Move test files to tests dir
There are 7 files duplicated, so those files was deleted
2012-08-21 14:32:39 +08:00
Anatoliy Belsky
7cf9ac1420 Merge branch 'PHP-5.4'
* PHP-5.4:
  More intl tests extracted from symfony
  Update version numbers to 5.4.7-dev.

Conflicts:
	configure.in
	main/php_version.h
2012-08-17 20:36:07 +02:00
Anatoliy Belsky
15e31d5720 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  More intl tests extracted from symfony
2012-08-17 20:31:00 +02:00
Matt Ficken
1a23d42909 More intl tests extracted from symfony 2012-08-17 20:29:08 +02:00
Reeze Xia
80044a0879 Fix intl tests failed because of missing skipif section 2012-08-15 01:03:56 +08:00
Anatoliy Belsky
7e2d550e88 Merge branch 'PHP-5.4'
* PHP-5.4:
  Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too.
2012-08-06 14:13:25 +02:00
Anatoliy Belsky
55b82abe00 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too.
2012-08-06 14:12:04 +02:00
Matt Ficken
ed793b2a3f Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too. 2012-08-06 14:07:42 +02:00
Xinchen Hui
c1a7369a40 Merge branch 'PHP-5.4' 2012-08-02 19:33:58 +08:00
Xinchen Hui
cbf1db38f7 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-02 19:33:27 +08:00
Xinchen Hui
2b6ac9e1a0 Fix test, wrong exepct rule used 2012-08-02 19:31:34 +08:00
Gustavo André dos Santos Lopes
06e06f026d Merge branch '5.4'
* 5.4:
  Fix test title and limit it to ICU >= 4.8
  Remove executable bit from files
  Limit test to ICU 49
  Remove executable bit from files
2012-07-30 11:04:48 +02:00
Gustavo André dos Santos Lopes
86ca788cc7 Fix test title and limit it to ICU >= 4.8 2012-07-30 11:04:10 +02:00
Gustavo André dos Santos Lopes
f8e693248f Remove executable bit from files 2012-07-30 10:32:27 +02:00
Gustavo André dos Santos Lopes
dec7bad635 Merge branch '5.3' into 5.4
* 5.3:
  Limit test to ICU 49
  Remove executable bit from files
2012-07-30 10:31:10 +02:00
Gustavo André dos Santos Lopes
7e3e1837c8 Limit test to ICU 49 2012-07-30 10:27:41 +02:00
Gustavo André dos Santos Lopes
9762609cec Remove executable bit from files 2012-07-30 10:25:17 +02:00
Gustavo André dos Santos Lopes
f356be68c2 ini intl.explicit_cleanup -> INTL_EXPLICIT_CLEANUP
Added an environment variable and removed the ini setting
intl.explicit_cleanup for calling u_cleanup()
2012-07-24 15:13:02 +02:00
Gustavo Lopes
ae3a827bf9 Leak caused by wrong and unreachable cleanup 2012-07-23 17:00:52 +02:00
Gustavo Lopes
01004c6abb Fixed leak in RuleBasedBreakIterator constructor
The leak occurred in case of error.
2012-07-23 16:51:28 +02:00
Gustavo Lopes
d8d5f9a9f5 Fixed function name 2012-07-23 16:46:28 +02:00
Gustavo Lopes
c052b9c99a Do not fetch default locale once on minit or rinit
The default locale is now requested to ICU when it's needed by using
intl_get_default_locale().
2012-07-23 16:38:27 +02:00
Gustavo Lopes
0dfcc3e798 Add ini setting intl.explicit_cleanup
This is to help with looking for leaks. If set to true, this ini
setting forces a call to u_cleanup() on module shutdown.
2012-07-23 16:36:24 +02:00
Gustavo André dos Santos Lopes
f3f824823d Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-07-23 02:08:12 +02:00
Gustavo André dos Santos Lopes
99e48d3a57 Merge branch 'datefmt_tz_cal_interop'
* datefmt_tz_cal_interop:
  Readded accidentally removed line
  Added IntlDateFormatter::formatObject(). Refactor
  Refactored internal_get_timestamp()
  Unified zval -> UDate conversions
2012-07-22 04:22:48 +02:00
Gustavo André dos Santos Lopes
2498c90c71 Readded accidentally removed line 2012-07-22 04:22:23 +02:00
Gustavo André dos Santos Lopes
2f0775b999 Added IntlDateFormatter::formatObject(). Refactor
To better support IntlCalendar, added this function:

string IntlDateFormatter::formatObject(IntlCalendar|DateTime $obj [,
	array|int|string $format = null [, string $locale = null).

$format is either of the constants IntlDateFormatter::FULL, etc., in
which case this format applies to both the date and the time, an array
in the form array($dateFormat, $timeFormat), or a string with the
SimpleDateFormat pattern.

This uses both the Calendar type and the timezone of the passed object
to configure the formatter (a GregorianCalendar is forced for
DateTime).

Some stuff was moved around and slighlt modified to allow for more code
reuse.
2012-07-22 04:22:23 +02:00
Felipe Pena
f94051ea11 - Fix conflict 2012-07-14 12:23:24 -03:00
Felipe Pena
0bff7cfadd - Fixed bug #62565 (Crashes due non-initialized internal properties_table) 2012-07-14 12:16:16 -03:00
Felipe Pena
44cdcb7fdb Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash)
2012-07-14 11:37:20 -03:00
Felipe Pena
8b093dee21 - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash) 2012-07-14 11:37:08 -03:00
Gustavo André dos Santos Lopes
46629e35ff Refactored internal_get_timestamp()
Added bounds checking for 32-bit ints.

Do not fetch array elements that ::parse() generates but that
::format() does not actually care about.y
2012-07-02 00:26:38 +02:00
Gustavo André dos Santos Lopes
2416719fb1 Unified zval -> UDate conversions
Now IntlDateFormatter::format() also accepts IntlCalendar objects.
Code is shared in MessageFormatter and IntlDateFormatter.
2012-07-02 00:24:54 +02:00
Stanislav Malyshev
a3322f8927 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed the common misspelling of the word occurred (occured -> occurred)
2012-06-30 17:00:25 -07:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Felipe Pena
8d264dba93 - Fixed build 2012-06-27 09:01:02 -03:00
Gustavo André dos Santos Lopes
75964450ed Merge branch 'break_iterator'
* break_iterator:
  Fix typo in error message
  BreakIterator: fix compat with old ICU versions
  Fix build error one ext/intl
  BreakIterator::getPartsIterator: new optional arg
  Added IntlCodePointBreakIterator.
  Add Intl prefix to BreakIterator/RuleBasedBI
  Remove trailing space
  Replaced zend_parse_method_params with plain zpp
  BreakIter: Removed getAvailableLocales/getHashCode
  Change in BreakIterator::getPartsIterator()
  BreakIterator: add rules status constants
  Tests for (RuleBased)BreakIterator.
  BreakIterator and RuleBasedBreakiterator added
2012-06-25 12:11:49 +02:00
Gustavo André dos Santos Lopes
0df73a85e1 Fix typo in error message 2012-06-25 12:06:31 +02:00
Gustavo André dos Santos Lopes
d8b067e66f BreakIterator: fix compat with old ICU versions 2012-06-25 12:05:13 +02:00
Gustavo André dos Santos Lopes
5a9dca458a Fix build error one ext/intl 2012-06-25 11:53:20 +02:00
Gustavo André dos Santos Lopes
715e59ad82 Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-06-25 11:13:23 +02:00
Gustavo André dos Santos Lopes
9c5074a484 Fix undeclared intl_locale_get_default()
This was causing segfaults at least in the resourcebundle
constructor.

Also moved intl_locale_get_default() to a more central location
and fixed a constness warning in resourcebundle_ctor().
2012-06-25 10:59:58 +02:00
Gustavo André dos Santos Lopes
77daa3482d BreakIterator::getPartsIterator: new optional arg
Can take one of:
* IntlPartsIterator::KEY_SEQUENTIAL (keys are 0, 1, ...)
* IntlPartsIterator::KEY_LEFT (keys are left boundaries)
* IntlPartsIterator::KEY_LEFT (keys are right boundaries)

The default is IntlPartsIterator::KEY_SEQUENTIAL (the previous behavior).
2012-06-22 18:52:06 +02:00
Gustavo André dos Santos Lopes
0a7ae87e91 Added IntlCodePointBreakIterator.
Objects of this class can be instantiated with

IntlBreakIterator::createCodePointInstance()

The method does not take a locale, as it would not make sense in this
context.

This class has one additional method:

long IntlCodePointIterator::getLastCodePoint()

which returns either -1 or the last code point we moved over, if any
(and discounting any movement before the last call to
IntlBreakIterator::first() or IntlBreakIterator::last()).
2012-06-22 18:19:54 +02:00
Gustavo André dos Santos Lopes
cee31091a9 Add Intl prefix to BreakIterator/RuleBasedBI 2012-06-10 22:42:38 +02:00
Gustavo André dos Santos Lopes
87dd0269ba Remove trailing space 2012-06-10 13:26:28 +02:00
Gustavo André dos Santos Lopes
a4925fae9b Replaced zend_parse_method_params with plain zpp 2012-06-10 00:23:09 +02:00
Gustavo André dos Santos Lopes
afed66bb9e BreakIter: Removed getAvailableLocales/getHashCode 2012-06-10 00:05:00 +02:00
Gustavo André dos Santos Lopes
4ec75539db Change in BreakIterator::getPartsIterator()
BreakIterator::getPartsIterator() now returns an IntlIterator subclass
with a special method, getBreakIterator(), that returns the
associated BreakIterator.

Any call to getRuleStatus() is forwarded to the BreakIterator.
2012-06-10 00:04:53 +02:00
Xinchen Hui
07d0eab204 Merge branch 'PHP-5.4'
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (2) and Xinchen Hui (2)
* PHP-5.4:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  merge 5.3 entries
  restore NEWS
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:42:35 +08:00
Xinchen Hui
83542dcf3b Merge branch 'PHP-5.3' into PHP-5.4
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (1) and Xinchen Hui (1)
* PHP-5.3:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:32:47 +08:00
Gustavo André dos Santos Lopes
c1ac325228 Fix ext/intl build on ICU < 4.8 2012-06-06 12:10:00 +02:00
Gustavo André dos Santos Lopes
52d541a314 Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+
as that it is now the default.
2012-06-06 11:36:00 +02:00
Gustavo André dos Santos Lopes
45b3fa4dee Fixed tests in ext/intl
21 is not a valid value for UNUM_PADDING_POSITION. Changed the test to
use 2 instead.

Remove ICU 4.2- test. No one cares.
2012-06-05 16:47:00 +02:00
Gustavo André dos Santos Lopes
c6593a0e9b BreakIterator: add rules status constants 2012-06-04 23:09:10 +02:00
Gustavo André dos Santos Lopes
036b1eb291 Tests for (RuleBased)BreakIterator. 2012-06-04 22:25:08 +02:00
Gustavo André dos Santos Lopes
f5b421621d BreakIterator and RuleBasedBreakiterator added
This commit adds wrappers for the classes BreakIterator and
RuleBasedbreakIterator. The C++ ICU classes are described here:
<http://icu-project.org/apiref/icu4c/classBreakIterator.html>
<http://icu-project.org/apiref/icu4c/classRuleBasedBreakIterator.html>

Additionally, a tutorial is available at:
<http://userguide.icu-project.org/boundaryanalysis>

This implementation wraps UTF-8 text in a UText. The text is
iterated without any copying or conversion to UTF-16. There is
also no validation that the input is actually UTF-8; where there
are malformed sequences, the UText will simply U+FFFD.

The class BreakIterator cannot be instantiated directly (has a
private constructor). It provides the interface exposed by the ICU
abstract class with the same name. The PHP class is not abstract
because we may use it to wrap native subclasses of BreakIterator
that we don't know how to wrap. This class includes methods to
move the iterator position to the beginning (first()), to the
end (last()), forward (next()), backwards (previous()), to the
boundary preceding a certain position (preceding()) and following
a certain position (following()) and to obtain the current position
(current()). next() can also be used to advance or recede an
arbitrary number of positions.

BreakIterator also exposes other native methods:
getAvailableLocales(), getLocale() and factory methods to build
several predefined types of BreakIterators: createWordInstance()
for word boundaries, createCharacterInstance() for locale
dependent notions of "characters", createSentenceInstance() for
sentences, createLineInstance() and createTitleInstance() -- for
title casing breaks. These factories currently return
RuleBasedbreakIterators where the names of the rule sets are found
in the ICU data, observing the passed locale (although the locale
is taken into considering there are very few exceptions to the
root rules).

The clone and compare_object PHP object handlers are also
implemented, though the comparison does not yield meaningful results
when used with >, <, >= and <=.

Note that BreakIterator is an iterator only in the sense of the
first 'Iterator' in 'IteratorIterator', i.e., it does not
implement the Iterator interface. The reason is that there is
no sensible implementation for Iterator::key(). Using it for
an ordinal of the current boundary is not feasible because
we are allowed to move to any boundary at any time. It we were
to determine the current ordinal when last() is called we'd
have to traverse the whole input text to find out how many
breaks there were before. Therefore, BreakIterator implements
only Traversable. It can be wrapped in an IteratorIterator,
but the usual warnings apply.

Finally, I added a convenience method to BreakIterator:
getPartsIterator(). This provides an IntlIterator, backed
by the BreakIterator PHP object (i.e. moving the pointer or
changing the text in BreakIterator affects the iterator
and also moving the iterator affects the backing BreakIterator),
which allows traversing the text between each boundary.
This iterator uses the original text to retrieve the text
between two positions, not the code points returned by the
wrapping UText. Therefore, if the text includes invalid code
unit sequences, these invalid sequences will be in the output
of this iterator, not U+FFFD code points.

The class RuleBasedIterator exposes a constructor that allows
building an iterator from arbitrary compiled or non-compiled
rules. The form of these rules in described in the tutorial linked
above. The rest of the methods allow retrieving the rules --
getRules() and getCompiledRules() --, a hash code of the rule set
(hashCode()) and the rules statuses (getRuleStatus() and
getRuleStatusVec()).

Because the RuleBasedBreakIterator constructor may return parse
errors, I reuse the UParseError to text function that was in the
transliterator files. Therefore, I move that function to
intl_error.c.

common_enum.cpp was also changed, mainly to expose previously
static functions. This avoided code duplication when implementing
the BreakIterator iterator and the IntlIterator returned by
BreakIterator::getPartsIterator().
2012-06-04 22:25:07 +02:00
Gustavo André dos Santos Lopes
9b233b7e5e Changed XFAILed collator_get_sort_key.phpt
Ressurected and limited to ICU 4.8 in the hope that the sort keys
will remain stable in more recent ICU versions. I have only tested
with ICU 4.8 so far.
2012-06-04 10:18:24 +02:00
Gustavo André dos Santos Lopes
758f0686d4 Added and fixed tests given eb346ef 2012-06-04 00:02:35 +02:00
Gustavo André dos Santos Lopes
eb346ef0f4 DateFormat plays nice with Calendar, TimeZone
The following changes were made:

* The IntlDateFormatter constructor now accepts the usual values
  for its $timezone argument. This includes timezone identifiers,
  IntlTimeZone objects, DateTimeZone objects and NULL. An empty
  string is not accepted. An invalid time zone is no longer accepted
  (it used to use UTC in this case).
* When NULL is passed to IntlDateFormatter, the time zone specified in
  date.timezone is used instead of the ICU default.
* The IntlDateFormatter $calendar argument now accepts also an
  IntlCalendar. In this case, IntlDateFormatter::getCalendar() will
  return false.
* The time zone passed to the IntlDateFormatter is ignored if it is
  NULL and if the calendar passed is an IntlCalendar object -- in this
  case, the IntlCalendar time zone will be used instead. Otherwise,
  the time zone specified in the $timezone argument is used instead.
* Added IntlDateFormatter::getCalendarObject(), which always returns
  the IntlCalendar object that backs the DateFormat, even if a
  constant was passed to the constructor, i.e., if an IntlCalendar
  was not passed to the constructor.
* Added IntlDateFormatter::setTimeZone(). It accepts the usual values
  for time zone arguments. If NULL is passed, the time zone of the
  IntlDateFormatter WILL be overridden with the default time zone,
  even if an IntlCalendar object was passed to the constructor.
* Added IntlDateFormatter::getTimeZone(), which returns the time zone
  that's associated with the DateFormat.
* Depreacated IntlDateFormatter::setTimeZoneId() and made it an alias
  for IntlDateFormatter::setTimeZone(), as the new ::setTimeZone()
  also accepts plain identifiers, besides other types.
  IntlDateFormatter::getTimeZoneId() is not deprecated however.
* IntlDateFormatter::setCalendar() with a constant passed should now
  work correctly. This requires saving the requested locale to the
  constructor.
* Centralized the hacks required to avoid compilation disasters on
  Windows due to some headers being included inside and outside of
  extern "C" blocks.
2012-06-04 00:01:48 +02:00
Gustavo André dos Santos Lopes
72beff0d41 Added private constructor to IntlTimeZone. 2012-06-03 23:39:34 +02:00
Gustavo André dos Santos Lopes
f3802db7a0 Fixed write in constant memory.
clang did not forgive.
2012-06-03 23:39:27 +02:00
Stanislav Malyshev
ec2029a894 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix test
  fix test
2012-05-29 23:53:01 -07:00
Stanislav Malyshev
9b98cf7865 fix test 2012-05-29 23:52:47 -07:00
Gustavo André dos Santos Lopes
a1e97bada8 Fixed problem in IntlCalendar debug handler
*is_temp was not being set.

Also deleted a redundant assignment to *is_temp in IntlTimeZone.
2012-05-25 13:29:19 +02:00
Gustavo André dos Santos Lopes
457a57d653 Merge branch '5.4' 2012-05-24 14:33:42 +02:00
Gustavo André dos Santos Lopes
04fd0b1098 Merge branch '5.3' into 5.4 2012-05-24 14:33:24 +02:00
Gustavo André dos Santos Lopes
85c777d2f1 Fixed bug #55610: ResourceBundle and Traversable 2012-05-24 14:33:05 +02:00
Gustavo André dos Santos Lopes
888e77ff73 Fixed last commit on 5.4
There's no change from the intended behavior. If INTL_G(default_locale)
is NULL, the default ICU locale, as given by locale_get_default() in
master, will still be used by ures_open().
2012-05-24 14:17:52 +02:00
Gustavo André dos Santos Lopes
a03f2e3814 Merge branch '5.4'
Conflicts:
	UPGRADING
2012-05-24 13:52:06 +02:00
Gustavo André dos Santos Lopes
92039fed22 Changed ResourceBundle constructor behavior
null is now accepted for two first (mandatory arguments).

Passing null as the package name causes NULL to be passed to ICU  and
the default ICU data to be loaded.

Passing null as the locale name causes the default locale to be used.
2012-05-24 13:50:59 +02:00
Gustavo André dos Santos Lopes
d4fd95e292 Merge branch '5.4' 2012-05-24 11:09:18 +02:00
Gustavo André dos Santos Lopes
e8009e2dca Merge branch '5.3' into 5.4 2012-05-24 11:08:55 +02:00
Gustavo André dos Santos Lopes
2da2de46a8 Fixed bug #60785
Memory leak in IntlDateFormatter constructor.

udat_setCalendar() clones the calendar before it adopts it,
so we were leaking the original calendar.

Also we now validate the calendar type.
2012-05-24 11:06:21 +02:00
Gustavo André dos Santos Lopes
ca515e8073 Merge branch '5.4' 2012-05-23 15:52:47 +02:00
Gustavo André dos Santos Lopes
0838a2b7c5 Merge branch '5.3' into 5.4 2012-05-23 15:52:32 +02:00
Gustavo André dos Santos Lopes
e08566c613 Fixed bug #62017
IntlDateFormatter constructor would release some resources
under certain error conditions.
2012-05-23 15:52:19 +02:00
Gustavo André dos Santos Lopes
70e3e627fe Fixed several ext/intl tests 2012-05-23 14:49:01 +02:00
Gustavo André dos Santos Lopes
2eb069aa48 Merge branch '5.4' 2012-05-23 13:27:54 +02:00
Gustavo André dos Santos Lopes
8ee8ccda19 Merge branch '5.3' into 5.4
Conflicts:
	sapi/fpm/fpm/fpm_main.c
2012-05-23 13:27:21 +02:00
Gustavo André dos Santos Lopes
1eff3b01b8 Fixed bug #6208: memory leak in grapheme_extract() 2012-05-23 13:25:45 +02:00