[PHP-CVS] com php-src: List ext/intl changes also in NEWS: NEWS

2012-11-12 Thread Gustavo André dos Santos Lopes
Commit:acbc6d182b3a9b13cd2dab06f631852d741fabc5
Author:Gustavo Lopes  Mon, 12 Nov 2012 
19:16:12 +0100
Parents:   0b96b4c4e9d4dc818713eee3159ff7c4ec6f5e9b
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=acbc6d182b3a9b13cd2dab06f631852d741fabc5

Log:
List ext/intl changes also in NEWS

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index ca21853..568ae65 100644
--- a/NEWS
+++ b/NEWS
@@ -63,6 +63,89 @@ PHP  
  NEWS
 - Hash
   . Added support for PBKDF2 via hash_pbkdf2(). (Anthony Ferrara)
 
+- Intl
+  . The intl extension now requires ICU 4.0+.
+  . Added intl.use_exceptions INI directive, which controls what happens when
+global errors are set together with intl.error_level. (Gustavo)
+  . MessageFormatter::format() and related functions now accepted named
+arguments and mixed numeric/named arguments in ICU 4.8+. (Gustavo)
+  . MessageFormatter::format() and related functions now don't error out when
+an insufficient argument count is provided. Instead, the placeholders will
+remain unsubstituted. (Gustavo)
+  . MessageFormatter::parse() and MessageFormat::format() (and their static
+equivalents) don't throw away better than second precision in the 
arguments.
+(Gustavo)
+  . IntlDateFormatter::__construct and datefmt_create() now accept for the
+$timezone argument time zone identifiers, IntlTimeZone objects, 
DateTimeZone
+objects and NULL. (Gustavo)
+  . IntlDateFormatter::__construct and datefmt_create() no longer accept 
invalid
+timezone identifiers or empty strings. (Gustavo)
+  . The default time zone used in IntlDateFormatter::__construct and
+datefmt_create() (when the corresponding argument is not passed or NULL is
+passed) is now the one given by date_default_timezone_get(), not the
+default ICU time zone. (Gustavo)
+  . 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's time zone will be used instead. Otherwise, the time zone
+specified in the $timezone argument is used instead. This does not affect
+old code, as IntlCalendar was introduced in this version. (Gustavo)
+  . IntlDateFormatter::__construct and datefmt_create() now accept for the
+$calendar argument also IntlCalendar objects. (Gustavo)
+  . IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false
+if the IntlDateFormatter was set up with an IntlCalendar instead of the
+constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not
+exist before this version. (Gustavo)
+  . IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept
+an IntlCalendar object, in which case its time zone is taken. Passing a
+constant is still allowed, and still keeps the time zone. (Gustavo)
+  . IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are
+deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone()
+instead. (Gustavo)
+  . IntlDateFormatter::format() and datefmt_format() now also accept an
+IntlCalendar object for formatting. (Gustavo)
+  . Added the classes: IntlCalendar, IntlGregorianCalendar, IntlTimeZone,
+IntlBreakIterator, IntlRuleBasedBreakIterator and
+IntlCodePointBreakIterator. (Gustavo)
+  . Added the functions: intlcal_get_keyword_values_for_locale(),
+intlcal_get_now(), intlcal_get_available_locales(), intlcal_get(),
+intlcal_get_time(), intlcal_set_time(), intlcal_add(),
+intlcal_set_time_zone(), intlcal_after(), intlcal_before(), intlcal_set(),
+intlcal_roll(), intlcal_clear(), intlcal_field_difference(),
+intlcal_get_actual_maximum(), intlcal_get_actual_minimum(),
+intlcal_get_day_of_week_type(), intlcal_get_first_day_of_week(),
+intlcal_get_greatest_minimum(), intlcal_get_least_maximum(),
+intlcal_get_locale(), intlcal_get_maximum(),
+intlcal_get_minimal_days_in_first_week(), intlcal_get_minimum(),
+intlcal_get_time_zone(), intlcal_get_type(),
+intlcal_get_weekend_transition(), intlcal_in_daylight_time(),
+intlcal_is_equivalent_to(), intlcal_is_lenient(), intlcal_is_set(),
+intlcal_is_weekend(), intlcal_set_first_day_of_week(),
+intlcal_set_lenient(), intlcal_equals(),
+intlcal_get_repeated_wall_time_option(),
+intlcal_get_skipped_wall_time_option(),
+intlcal_set_repeated_wall_time_option(),
+intlcal_set_skipped_wall_time_option(), intlcal_from_date_time(),
+intlcal_to_date_time(), intlcal_get_error_code(),
+intlcal_get_error_message(), intlgregcal_create_instance(),
+intlgregcal_set_gregorian_change(), intlgregcal_get_gregorian_change() and
+intlgregcal_is_leap_year(). (Gustavo)
+  . Added the functions: intltz_create_time_zone(), intltz_create_default(),
+intltz_get_id(), intltz_get_gmt(), intltz_get_unknown(),
+intltz_

[PHP-CVS] com php-src: Merge branch 'PHP-5.4': ext/pcre/php_pcre.c

2012-11-12 Thread Adam Harvey
Commit:0b96b4c4e9d4dc818713eee3159ff7c4ec6f5e9b
Author:Adam Harvey  Mon, 12 Nov 2012 20:09:18 +0800
Parents:   180767373d03238431103c02a93de19df49c14dc 
6b9df7a4542c47fa6ab615461913ccdf7cdd4e10
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=0b96b4c4e9d4dc818713eee3159ff7c4ec6f5e9b

Log:
Merge branch 'PHP-5.4'

* PHP-5.4:
  Update arginfo for preg_match_all() to reflect reality.
  fix invalid read when trimming empty string

Changed paths:
  MM  ext/pcre/php_pcre.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Update arginfo for preg_match_all() to reflect reality.: ext/pcre/php_pcre.c

2012-11-12 Thread Adam Harvey
Commit:bca8ff723d1d2721e410ecdf10955aea57445a19
Author:Adam Harvey  Mon, 12 Nov 2012 20:04:26 +0800
Parents:   5b82fb52fd5143a3860db219eb39616c6e642a4b
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bca8ff723d1d2721e410ecdf10955aea57445a19

Log:
Update arginfo for preg_match_all() to reflect reality.

Back when I implemented FR #53238 during the 5.4 development phase to make the
$matches parameter optional in preg_match_all(), it turns out I forgot to
update the arginfo to note that only 2 parameters are now required by
preg_match_all(). The function itself works fine, but reflection was reporting
the wrong number of required parameters.

Bugs:
https://bugs.php.net/53238

Changed paths:
  M  ext/pcre/php_pcre.c


Diff:
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 2f892c8..b18c9ed 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1866,7 +1866,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2)
 ZEND_ARG_INFO(0, offset)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 3)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 2)
 ZEND_ARG_INFO(0, pattern)
 ZEND_ARG_INFO(0, subject)
 ZEND_ARG_INFO(1, subpatterns) /* array */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix invalid read when trimming empty string: ext/filter/filter_private.h

2012-11-12 Thread Antony Dovgal
Commit:bb60122c2fe49985b35026ecc48ff6cf550fbac1
Author:Antony Dovgal  Sun, 11 Nov 2012 22:37:04 
+0400
Parents:   065862a750a4c7b20d580b4e32a9df62b00b90a0
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=bb60122c2fe49985b35026ecc48ff6cf550fbac1

Log:
fix invalid read when trimming empty string

Changed paths:
  M  ext/filter/filter_private.h


Diff:
diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h
index daa688b..6c26d98 100644
--- a/ext/filter/filter_private.h
+++ b/ext/filter/filter_private.h
@@ -107,8 +107,10 @@
if (len < 1) { \
RETURN_VALIDATION_FAILED \
} \
-   while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || 
p[len-1] == '\v' || p[len-1] == '\n') { \
-   len--; \
+   if (len > 0) { \
+   while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' 
|| p[len-1] == '\v' || p[len-1] == '\n') { \
+   len--; \
+   } \
} \
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php