Commit Graph

29800 Commits

Author SHA1 Message Date
Anatoliy Belsky
0b297a17e8 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62137 ext\phar\tests\fatal_error_webphar.phpt fails
2012-05-24 12:06:53 +02:00
Anatoliy Belsky
b5511dcfd7 Fix bug #62137 ext\phar\tests\fatal_error_webphar.phpt fails 2012-05-24 12:04:38 +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
Gustavo André dos Santos Lopes
86ea921291 Fixed bug #62082
This was a buffer overflow in internal function
get_icu_disp_value_src_php().
2012-05-23 13:25:42 +02:00
Gustavo André dos Santos Lopes
07c0d714a5 Fixed bug #62081
Constructor of IntlDateFormatter would leak if called twice.

Made calling it more than once error out before starting
using resources.
2012-05-23 13:25:37 +02:00
Gustavo André dos Santos Lopes
51286bd8e5 Fixed bug #62070
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
2012-05-23 13:25:32 +02:00
Gustavo André dos Santos Lopes
adf2fba307 Merge branch '5.4' 2012-05-23 11:37:45 +02:00
Gustavo André dos Santos Lopes
3e62aae1b4 Fix bug #62112: number_format() is not binary safe
The bug report actually urges PHP 5.3's behavior to be
reinstated -- that is, make "\0", when used as a separator,
be the same as no separator at all. I believe that is not a
proper course of action and that "\0" being interpreted as
no seperator was a bug in PHP 5.3.

Using "" for no separator, in both 5.3 and 5.4, before and
after this change, causes no separator to be used, so
there is no functionality loss.
2012-05-23 11:37:27 +02:00
Xinchen Hui
c0f62636e8 Merge branch 'PHP-5.4'
* PHP-5.4:
  Revert NEWS
  Revert "Implemented FR #61602 Allow access to name of constant used as default value"
  Fix typo while resolving conflicts
  Revert "Implemented FR #61602 Allow access to name of constant used as default value"
2012-05-23 13:53:25 +08:00
Xinchen Hui
df481764f3 Revert "Implemented FR #61602 Allow access to name of constant used as default value"
This reverts commit 054f3e3ce5.

See: http://news.php.net/php.cvs/69137 and the author confirmed.
Will commit later after the author fixed this then make a new PR.

Conflicts:

	ext/reflection/php_reflection.c
2012-05-23 13:50:12 +08:00
Xinchen Hui
f733173b1f Fix typo while resolving conflicts 2012-05-23 13:43:49 +08:00
Xinchen Hui
a7df6ce664 Revert "Implemented FR #61602 Allow access to name of constant used as default value"
This reverts commit 054f3e3ce5.

See: http://news.php.net/php.cvs/69137 and the author confirmed.
Will commit later after the author fixed this then make a new PR.

Conflicts:

	ext/reflection/php_reflection.c
2012-05-23 13:39:00 +08:00
Felipe Pena
1d1486016a Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fix the fix (typo s/AIX/_AIX/g)
2012-05-21 08:55:05 -03:00
Felipe Pena
074d361d64 - Fix the fix (typo s/AIX/_AIX/g) 2012-05-21 08:54:59 -03:00
Anatoliy Belsky
60aebdf6e8 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt
2012-05-21 12:52:33 +02:00
Anatoliy Belsky
fbb86bd7b3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt
2012-05-21 12:52:10 +02:00
Matt Ficken
c973fef48d Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt 2012-05-21 12:51:24 +02:00
Anatoliy Belsky
230f9e8733 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62068 Test bug - gmp_nextprime and 022
  Fix: 62067 Moved comments to FILE section
  - BFN
2012-05-21 12:38:43 +02:00
Anatoliy Belsky
77e70b391c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62068 Test bug - gmp_nextprime and 022
  Fix: 62067 Moved comments to FILE section
  - BFN

Conflicts:
	NEWS
2012-05-21 12:37:59 +02:00
Matt Ficken
645d65f3e3 Fixed bug #62068 Test bug - gmp_nextprime and 022 2012-05-21 12:31:16 +02:00
Felipe Pena
f3615bc6f7 - Fixed bug #62025 (__ss_family was changed on AIX 5.3) 2012-05-20 19:39:54 -03:00
Felipe Pena
ffe8303f24 - Fixed bug #62025 (__ss_family was changed on AIX 5.3) 2012-05-20 19:37:20 -03:00
Felipe Pena
82740ef31e - Fixed build using g++ (which complains about jump that crosses initialization) 2012-05-20 16:17:17 -03:00
Gustavo André dos Santos Lopes
d9ca243212 Merge remote branch 'github/intl_calendar' 2012-05-20 19:50:17 +01:00
zoe slattery
867447f420 Fix: 62067 Moved comments to FILE section 2012-05-19 16:34:16 +01:00
zoe slattery
778d69ddfe Fix: 62067 Moved comments to FILE section 2012-05-19 16:33:36 +01:00
zoe slattery
cd8cf5f495 Fix: 62067 Moved comments to FILE section 2012-05-19 16:18:12 +01:00
Felipe Pena
f5e2315660 - Fixed bug #62064 (memory leak in the XML Writer module) 2012-05-18 19:34:39 -03:00
Felipe Pena
88275e547f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62064 (memory leak in the XML Writer module)
2012-05-18 19:23:42 -03:00
Felipe Pena
6d928fd26d - Fixed bug #62064 (memory leak in the XML Writer module) 2012-05-18 19:23:29 -03:00
Gustavo André dos Santos Lopes
3a81f90ebc Added IntlCalendar::toDateTime() 2012-05-17 23:18:51 +02:00
Gustavo André dos Santos Lopes
49b1f58194 Fixed a couple of memory leaks 2012-05-17 23:17:00 +02:00
Gustavo André dos Santos Lopes
887744f6b4 Fixed bad DateTime construction state check 2012-05-17 18:16:54 +02:00
Gustavo André dos Santos Lopes
ec23c3e540 MessageFormatter accepts IntlCalendar arguments
Now MessageFormatter::format() accepts IntlCalendar objects to be used in
arguments of type Format::kDate.
2012-05-17 17:57:37 +02:00
Gustavo André dos Santos Lopes
e9351b89a9 Bug #58756: w.r.t MessageFormatter (partial fix)
I don't think the current ICU API allows this bug to be completely fixed.

Right now, the code cannot control the time zone used in date/time formats
that appear inside complex subformats. See the comment inside
umsg_set_timezone().
2012-05-17 17:57:01 +02:00
Gustavo André dos Santos Lopes
30bf2fbb9d Handle bogus string in intl_charFromString(). 2012-05-17 17:23:53 +02:00
Gustavo André dos Santos Lopes
81d8f4079c Whitespace. 2012-05-17 17:23:52 +02:00
Gustavo André dos Santos Lopes
4cfd9995da Added IntlTimeZone::fromDateTimeZone() and ::toDateTimeZone.
IntlTimeZone::fromDateTimeZone(DateTimeZone $dtz) converts from an
ext/date TimeZone to an IntlTimeZone. The conversion is done by feeding
the time zone name (essentially what would be given by
DateTimeZone::getName()) to ICU's TimeZone::createTimeZone except if it's
an offset time zone. In that case, the offset is read from the ext/date
time zone object structure and an appopriate id (of the form
GMT<+|-><HH:MM>) is given to ICU's TimeZone::createTimeZone. Not all
ext/date time zones are recognized for ICU. For instance, WEST is not.
Note that these kind of abbreviations, as far as I can tell, can only be
created via ext/date DateTime, not directly through DateTimeZone's
constructor.

For IntlTimeZone::toDateTimeZone(), the behavior is symmetrical.
We instantiate a DateTimeZone and then call its constructor if we don't
have an offset time zone, otherwise we mess with its structure. If the
timezone is not valid for ext/date, then we allow the exception of
DateTimeZone constructor to propagate.
2012-05-17 17:23:51 +02:00
Gustavo André dos Santos Lopes
22f4a30748 Fixed two IntlCalendar::setTimeZone() tests. 2012-05-17 17:23:50 +02:00
Gustavo André dos Santos Lopes
81278e1bbb Added IntlCalendar::fromDateTime()
IntlCalendar::fromDateTime(DateTime|string $dateTime[, string $locale)
intlcal_from_date_time(...)

If a string is given as the first argument, the method will try to
instantiate a new DateTime object and use that instead.
2012-05-17 17:23:47 +02:00
Gustavo André dos Santos Lopes
9a35d45a5b Accept DateTimeZone where time zones are expected.
Also unified timezone handling in IntlCalendar::setTimeZone()
to that in the IntlCalendar and IntlGregorianCalendar constructors.
2012-05-17 17:23:46 +02:00