Commit Graph

30133 Commits

Author SHA1 Message Date
Anthony Ferrara
4918acccc6 refactor away un-necessary casts in hashing routines 2012-06-12 14:09:16 -04:00
Anthony Ferrara
6387498823 Create hash_pbkdf2 function addition 2012-06-12 09:57:11 -04:00
Scott MacVicar
5b3c9f4fd1 One more time 2012-06-11 16:23:27 -07:00
Scott MacVicar
bcd671d999 Merge branch '5.4'
* 5.4:
  Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell.
  Add PBKDF2 support via openssl()

Conflicts:
	ext/openssl/openssl.c
2012-06-11 16:04:01 -07:00
Scott MacVicar
aadf59dfa4 Add PBKDF2 support via openssl()
Summary:
No easy way to put these in the hash extension since we don't really support optional
parameters to certain algorithms. Implemented in openssl for now since it has it already
and is pretty stable.

Only SHA1 is confirmed to work as an algorithm but openssl has a parameter so it can be
changed in the future.

Will backport to 5.4 potentially with Stas' approval.

Test Plan:
Ran newly added tests which came from RFC 6070
2012-06-11 15:59:58 -07:00
Scott MacVicar
bccd1e672f Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell.
Summary:
Stas pointed out that this is named pretty poorly. Go for openssl_pbkdf2()
2012-06-11 15:41:41 -07:00
Scott MacVicar
b5b8ea1050 Add PBKDF2 support via openssl()
Summary:
No easy way to put these in the hash extension since we don't really support optional
parameters to certain algorithms. Implemented in openssl for now since it has it already
and is pretty stable.

Only SHA1 is confirmed to work as an algorithm but openssl has a parameter so it can be
changed in the future.

Will backport to 5.4 potentially with Stas' approval.

Test Plan:
Ran newly added tests which came from RFC 6070
2012-06-11 13:35:25 -07:00
Scott MacVicar
b481ebae55 Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell.
Summary:
Stas pointed out that this is named pretty poorly. Go for openssl_pbkdf2()
2012-06-11 12:38:54 -07:00
Felipe Pena
733aaf23b1 - Fixed build (PKCS5_PBKDF2_HMAC is from 1.0.0) 2012-06-11 14:08:38 -03:00
Anatoliy Belsky
0c6351778a Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62271 test bug - ext/wddx/tests/bug48562.phpt
2012-06-11 17:03:14 +02:00
Matt Ficken
a18cede1c5 Fix bug #62271 test bug - ext/wddx/tests/bug48562.phpt 2012-06-11 17:00:36 +02:00
Scott MacVicar
32040b574e Merge branch '5.4'
* 5.4:
  Add PBKDF2 support via openssl()
2012-06-11 00:29:02 -07:00
Scott MacVicar
f4847efc5d Add PBKDF2 support via openssl()
Summary:
No easy way to put these in the hash extension since we don't really support optional
parameters to certain algorithms. Implemented in openssl for now since it has it already
and is pretty stable.

Only SHA1 is confirmed to work as an algorithm but openssl has a parameter so it can be
changed in the future.

Will backport to 5.4 potentially with Stas' approval.

Test Plan:
Ran newly added tests which came from RFC 6070
2012-06-11 00:24:44 -07:00
Gustavo André dos Santos Lopes
cee31091a9 Add Intl prefix to BreakIterator/RuleBasedBI 2012-06-10 22:42:38 +02:00
David Soria Parra
ff13501d33 Merge branch 'PHP-5.4'
By Stanislav Malyshev (1) and michelangelo (1)
* PHP-5.4:
  Adding a test for ext/posix/tests/posix_getegid_basic.phpt
  typo
2012-06-10 17:08:10 +04:00
David Soria Parra
b9babd22e0 Merge branch 'PHP-5.3' into PHP-5.4
By Stanislav Malyshev (1) and michelangelo (1)
* PHP-5.3:
  Adding a test for ext/posix/tests/posix_getegid_basic.phpt
  typo
2012-06-10 17:08:02 +04:00
michelangelo
cda14b995c Adding a test for ext/posix/tests/posix_getegid_basic.phpt 2012-06-10 17:07:49 +04: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
Gustavo André dos Santos Lopes
76a26d8419 Merge branch '5.4'
* 5.4:
  Fix bug #62266
  rearrange news
  typo
  NEWS File
2012-06-09 17:32:18 +01:00
Gustavo André dos Santos Lopes
503358c179 Fix bug #62266
Custom extension segfaults during xmlParseFile with FPM SAPI
because the regular list is not prepared during the MINIT phase
and our custom external entity loader tries to open PHP streams.
2012-06-09 17:29:47 +01:00
Anatoliy Belsky
730493f2bb Merge branch 'PHP-5.4'
* PHP-5.4:
  set current versions for libzip and zip ext
2012-06-07 22:47:00 +02:00
Anatoliy Belsky
d24d5b62c1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  set current versions for libzip and zip ext
2012-06-07 22:37:32 +02:00
Anatoliy Belsky
baacc2cb13 set current versions for libzip and zip ext 2012-06-07 22:32:03 +02:00
Anatoliy Belsky
ba4bfad257 Merge branch 'PHP-5.4'
* PHP-5.4:
  zip windows fixes
  fixed bc break related to #57905
  fixed a bit overlooked from the last libzip port
  brought the fix for #47667 back
  fixed zip entry freeing
  rechecked the merged libzip, took also the indents from the original to avoid confusion next time
  fixed a double freeing crash
  fixed header include
  initial libzip upgrade patch to 0.10.1
  - BFN
2012-06-07 21:07:53 +02:00
Anatoliy Belsky
5ebdc46aa0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  zip windows fixes
  fixed bc break related to #57905
  fixed a bit overlooked from the last libzip port
  brought the fix for #47667 back
  fixed zip entry freeing
  rechecked the merged libzip, took also the indents from the original to avoid confusion next time
  fixed a double freeing crash
  fixed header include
  initial libzip upgrade patch to 0.10.1
  - BFN

Conflicts:
	NEWS
2012-06-07 21:06:31 +02:00
Anatoliy Belsky
bde0e8c2a1 zip windows fixes 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
8ca457f64d fixed bc break related to #57905 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
e883892664 fixed a bit overlooked from the last libzip port 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
b8cdc731b8 brought the fix for #47667 back 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
a37e84e549 fixed zip entry freeing 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
f4a44f18b8 rechecked the merged libzip, took also the indents from the original to
avoid confusion next time
2012-06-07 21:01:31 +02:00
Anatoliy Belsky
a39bcfc5ee fixed a double freeing crash 2012-06-07 21:01:31 +02:00
Anatoliy Belsky
9a2365412e fixed header include 2012-06-07 21:01:31 +02:00
Anatoliy Belsky
335a11b14b initial libzip upgrade patch to 0.10.1 2012-06-07 21:01:31 +02:00
Felipe Pena
018a9b321f Merge commit '15213768e6cc098ab4e53cacc3b5eb86fa85284a' into PHP-5.3 2012-06-07 14:18:34 -03:00
Pierrick Charron
5b10a65617 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
2012-06-07 17:51:56 +02:00
Pierrick Charron
494c170e6f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
2012-06-07 17:45:43 +02:00
Pierrick Charron
fed5923dbc Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
Modify the scanner to check if the first char of the raw data is an opening " in which case we
need to find the closing one. Otherwise just search for the next end of value char [\r\n;\000]
2012-06-07 17:44:20 +02:00
David Soria Parra
753c3367c0 Merge branch 'pull-request/60'
By David Soria Parra (1) and Jille Timmermans (1)
* pull-request/60:
  NEWS entry for boolval()
  Implement boolval() with a test
2012-06-07 09:38:17 +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
Jille Timmermans
74b4ef5036 Implement boolval() with a test 2012-06-06 22:34:51 +02: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
Felipe Pena
15213768e6 - Fixed bug #62227 (Invalid phar stream path causes crash) 2012-06-04 20:07:14 -03: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
6efc877826 Merge branch 'datefmt_tz_cal_interop'
* datefmt_tz_cal_interop:
  Added and fixed tests given eb346ef
  DateFormat plays nice with Calendar, TimeZone
  Added private constructor to IntlTimeZone.
  Fixed write in constant memory.
2012-06-03 23:08:19 +01:00
Gustavo André dos Santos Lopes
758f0686d4 Added and fixed tests given eb346ef 2012-06-04 00:02:35 +02:00
Felipe Pena
9434f5e41f Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' 2012-06-03 19:02:00 -03:00
Felipe Pena
8779a9aad5 Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' into PHP-5.4 2012-06-03 19:01:50 -03: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
Felipe Pena
4fc49c04df Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' into PHP-5.3 2012-06-03 19:00:49 -03: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
Felipe Pena
e59b6dc0ae - Fixed information leak in ext exif (discovered by Martin Noga, Matthew "j00ru" Jurczyk, Gynvael Coldwind) 2012-06-03 15:23:07 -03:00
andrey
2c230fb574 close the underlying stream as early as possible and so notify the
NET layer
2012-06-01 22:12:08 +03:00
andrey
ba23ddd06c Merge branch 'master' of git.php.net:php-src 2012-06-01 11:22:52 +03:00
andrey
f96d19fa70 close the stream whenever possible, no need to keep it open altough the
connection is marked as unusable
2012-06-01 11:22:19 +03:00
Xinchen Hui
fc6462ec7b Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
  sort NEWS
2012-06-01 15:00:55 +08:00
Xinchen Hui
b548d9ad2e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
2012-06-01 15:00:02 +08:00
Xinchen Hui
1f5327a602 Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant) 2012-06-01 14:57:27 +08:00
Reeze Xia
13a9555342 Implemented FR #61602 Allow access to name of constant used as default value
This is an improved commit for FR #61602, this fixed the previous
commit 054f3e3's C99 compiler compatibility issue
2012-05-31 23:31:00 +08:00
andrey
9a64a23caf Merge branch 'master' of git.php.net:php-src 2012-05-31 15:46:55 +03:00
andrey
0d1bc3e8e5 more refactoring stuff. Reduced code duplication in the authentication
code
2012-05-31 15:46:26 +03:00
Stanislav Malyshev
0c658c39f6 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix bug #55042 - erealloc without updating pointer
2012-05-30 22:27:54 -07:00
Stanislav Malyshev
ed6ce83101 fix bug #55042 - erealloc without updating pointer 2012-05-30 22:26:26 -07:00
Johannes Schlüter
33849c2211 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62186 readline fails to compile
  fix unchecked emalloc (cherry picked from commit 158d8a6b08)
2012-05-31 01:18:02 +02:00
Johannes Schlüter
428dddd3e8 Fix bug #62186 readline fails to compile 2012-05-31 01:15:22 +02:00
Stanislav Malyshev
fa05f038cb fix unchecked emalloc
(cherry picked from commit 158d8a6b08)
2012-05-30 21:37:28 +02:00
andrey
56532895a8 Merge branch 'master' of git.php.net:php-src 2012-05-30 15:25:26 +03:00
andrey
5a2578a333 small refactoring - factour out code from connection establishment.
Add a define for the default authentication protocol - get away from
the hardcoded magic value
2012-05-30 15:24:17 +03: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
Xinchen Hui
4770fe2c97 Merge branch 'PHP-5.4'
* PHP-5.4:
  Typofix in comment in proc_open.c
2012-05-30 14:44:35 +08:00
Xinchen Hui
7511f972fd Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Typofix in comment in proc_open.c
2012-05-30 14:43:55 +08:00
Jille Timmermans
a331f43f8c Typofix in comment in proc_open.c 2012-05-30 14:42:39 +08:00
Stanislav Malyshev
f428578138 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix CVE-2012-2143
2012-05-29 23:14:09 -07:00
Stanislav Malyshev
692b3bcd88 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix CVE-2012-2143
2012-05-29 23:08:04 -07:00
Stanislav Malyshev
aab49e934d fix CVE-2012-2143 2012-05-29 23:07:04 -07:00
Anatoliy Belsky
9a9362cb09 Merge branch 'PHP-5.4'
* PHP-5.4:
  updated the libmagic patch after Felipes regex fix
2012-05-29 17:42:35 +02:00
Anatoliy Belsky
6074da9809 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated the libmagic patch after Felipes regex fix
2012-05-29 17:41:57 +02:00
Anatoliy Belsky
8d5e953a19 updated the libmagic patch after Felipes regex fix 2012-05-29 17:38:30 +02:00
Anatoliy Belsky
3a35479e59 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt
  Bug #62177 deactivate the linux test version on win
  Fix bug #62177 Test Bug - finfo_file_regex.phpt
2012-05-29 16:43:40 +02:00
Anatoliy Belsky
c0e046a130 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt
  Bug #62177 deactivate the linux test version on win
  Fix bug #62177 Test Bug - finfo_file_regex.phpt
2012-05-29 16:43:20 +02:00
Matt Ficken
ad0371ac7e Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt 2012-05-29 16:38:57 +02:00
Matt Ficken
b4b0aaae93 Bug #62177 deactivate the linux test version on win 2012-05-29 16:37:19 +02:00
Matt Ficken
dbc727373c Fix bug #62177 Test Bug - finfo_file_regex.phpt 2012-05-29 16:31:47 +02:00
Anatoliy Belsky
dffbc98239 Merge branch 'PHP-5.4'
* PHP-5.4: (21 commits)
  Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
  fix unchecked emalloc
  add CVE
  add bug 62146
  add bug #62082
  sync with HEAD
  sync with HEAD
  Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks)
  Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks)
  Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests)
  Fixed bug #61218 (FPM drops connection while receiving some binary valuesin FastCGI requests)
  Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured)
  - Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured)
  - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
  - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
  - add missing headers to avoid warnings
  - add missing headers to avoid warnings
  - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors)
  - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors)
  - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start)
  ...

Conflicts:
	NEWS
2012-05-29 12:25:25 +02:00
Stanislav Malyshev
158d8a6b08 fix unchecked emalloc 2012-05-28 18:54:15 -07:00
Pierrick Charron
fde8762e90 Added support for CURLOPT_MAIL_AUTH
pull-request/92:
  Added support for CURLOPT_MAIL_AUTH for libcurl >= 7.25.0
2012-05-27 23:43:52 -04:00
Nuno Lopes
af2d6a63bf remove remaining traces of unicode.* ini settings 2012-05-27 19:57:34 -04:00
Your Name
60c4728594 VIM uses spaces as tabs and that doesn't comply with the coding
standard. I think I'd fixed it so it's using real tabs now.
2012-05-27 15:39:45 -07:00
Your Name
0667da8cb4 Removed syslog.h. That should never have been commited. 2012-05-27 01:50:29 -07:00
Your Name
d41fb16a52 Fixed the libcurl version checking for CURLOPT_MAIL_AUTH 2012-05-27 00:21:08 -07:00
Your Name
f75c1ed201 Added support for CURLOPT_MAIL_AUTH 2012-05-27 00:02:53 -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
Reeze Xia
1d2f619049 Fixed bug #61964 (finfo_open with directory cause invalid free) 2012-05-25 18:55:34 +08:00
Anatoliy Belsky
c8d8d2442e Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62149 Test Bug - ext/curl/tests/bug61948
  Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build
2012-05-25 10:53:09 +02:00
Anatoliy Belsky
16a592b13a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62149 Test Bug - ext/curl/tests/bug61948
  Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build
2012-05-25 10:52:38 +02:00
Matt Ficken
86d2fafded Fixed bug #62149 Test Bug - ext/curl/tests/bug61948 2012-05-25 10:44:59 +02:00
Matt Ficken
4aac4da673 Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build 2012-05-25 10:34:33 +02:00
Anatoliy Belsky
e2daa69b62 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62147 test bug - popen_pclose_basic-win32
2012-05-25 10:05:23 +02:00
Anatoliy Belsky
6fb0e4a401 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62147 test bug - popen_pclose_basic-win32
2012-05-25 09:55:53 +02:00
Matt Ficken
d4d36fba28 Fixed bug #62147 test bug - popen_pclose_basic-win32 2012-05-25 09:53:51 +02:00
Johannes Schlüter
cf73fb5f75 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62146 	com_dotnet cannot be built shared, tested by Anatoliy
  Those changes are in 5.3.15
  - BFN
2012-05-25 00:25:16 +02:00
Johannes Schlüter
3cd50ca714 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62146 	com_dotnet cannot be built shared, tested by Anatoliy
  Those changes are in 5.3.15
  - BFN
2012-05-25 00:23:51 +02:00
Johannes Schlüter
8fc9df3f67 Fix bug #62146 com_dotnet cannot be built shared, tested by Anatoliy 2012-05-25 00:22:25 +02:00
Felipe Pena
6c9056ceb7 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-05-24 13:45:36 -03:00
Felipe Pena
3bd0a52468 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed magic file regex support
2012-05-24 13:43:53 -03:00
Felipe Pena
84b2c39920 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed magic file regex support
2012-05-24 13:43:35 -03:00
Felipe Pena
11b4f3becd - Fixed magic file regex support 2012-05-24 13:42:47 -03:00
Xinchen Hui
7c297ca31e Merge remote-tracking branch 'origin/PHP-5.4'
* origin/PHP-5.4:
  Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys)
2012-05-24 23:38:53 +08:00
Xinchen Hui
a10da87c6a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys)
2012-05-24 23:34:14 +08:00
Xinchen Hui
bde86a6639 Fixed bug #62073
(Different ways of iterating over an SplMaxHeap result in in different keys)
2012-05-24 23:31:05 +08: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
Anatoliy Belsky
1d30fb4c04 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62140 ext\standard\tests\file\tempnam_variation7-win32.phpt fails
2012-05-24 13:59:57 +02:00
Anatoliy Belsky
72c7cfe6f2 Fixed bug #62140 ext\standard\tests\file\tempnam_variation7-win32.phpt fails 2012-05-24 13:58:42 +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
Anatoliy Belsky
674a04dfc7 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62139 ext\standard\tests\file\rename_variation13-win32.phpt fails
2012-05-24 13:27:24 +02:00
Anatoliy Belsky
0e12a778df Fix bug #62139 ext\standard\tests\file\rename_variation13-win32.phpt fails 2012-05-24 13:26:32 +02:00
Anatoliy Belsky
0dc9b0e708 Fixed bug #62138 ext\standard\tests\dir\dir_variation8-win32.phpt fails 2012-05-24 12:39:00 +02:00
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
Reeze Xia
9205c4fd62 Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys) 2012-05-23 20:42:06 +08: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
Johannes Schlüter
67039363cd Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:/php-src:
  Fix for bug#62046
2012-05-16 16:46:08 +02:00
Stanislav Malyshev
6e51989501 fd fix 2012-05-16 16:35:16 +02:00
Stanislav Malyshev
4eb802bb14 fix bug #61065
(cherry picked from commit a10e778bfb)
2012-05-16 16:30:29 +02:00
andrey
dec56ca1e3 Merge branch 'PHP-5.4' 2012-05-16 16:00:17 +02:00
andrey
4d2d8e8717 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/mysqlnd/mysqlnd_ps.c

merge fix for bug#62046
2012-05-16 15:59:39 +02:00
andrey
d4afbd487a Fix for bug#62046
Bug#62046 mysqli@mysqlnd can't iterate over stored sets after call to
mysqli_stmt_reset().

Stmt's state was changed to STMT_PREPARED and leads the driver to think
that the stmt was just prepared. Because result set exist also for only
prepared but not executed sets, the check for stmt->result isn't any good.
There is a result set, because as response for COM_PREPARE the server sends
metadata and metadata is part of a result set. After COM_EXECUTE the server
sends metadata again, which could be different and in this case more correct.
2012-05-16 14:28:55 +02:00
Stanislav Malyshev
910a4696e1 Merge branch 'PHP-5.4'
* PHP-5.4:
  Revert "Update test to fix breakage caused by the previous commit."
  fix test
  to 5.4.5-dev
2012-05-15 23:30:34 -07:00
Stanislav Malyshev
d84fa39667 Revert "Update test to fix breakage caused by the previous commit."
This reverts commit 05c8d4766c.
Connected to revert 7bbd5521d2.
2012-05-15 23:25:06 -07:00
Stanislav Malyshev
6a0212ea88 Merge branch 'PHP-5.4'
* PHP-5.4:
  fd fix
  fix bug #61065

Conflicts:
	UPGRADING
2012-05-15 22:39:17 -07:00
Stanislav Malyshev
df2a38e7f8 fd fix 2012-05-15 22:35:43 -07:00
Stanislav Malyshev
a10e778bfb fix bug #61065 2012-05-15 22:34:34 -07:00
zoe slattery
129c830562 Merge branch 'PHP-5.4'
* PHP-5.4:
  Changes to remaining two tests, #62022
2012-05-15 14:40:49 +01:00
zoe slattery
63401268db Changes to remaining two tests, #62022 2012-05-15 14:39:51 +01:00
zoe slattery
3556efc8e2 Merge branch 'PHP-5.4'
* PHP-5.4:
  Small fixes to tests, see #62022
2012-05-15 11:48:21 +01:00
zoe slattery
d99203d44b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Small fixes to tests, see #62022
2012-05-15 11:43:28 +01:00
zoe slattery
e35f09d774 Small fixes to tests, see #62022 2012-05-15 11:42:14 +01:00
zoe slattery
ec3a96a2e6 Merge branch 'PHP-5.4'
* PHP-5.4:
  Change impl of GZIP_POST, DEFLATE_POST. See #62021
2012-05-15 11:06:48 +01:00
zoe slattery
968dfae6d1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Change impl of GZIP_POST, DEFLATE_POST. See #62021
2012-05-15 11:06:14 +01:00
zoe slattery
1af8b3f883 Change impl of GZIP_POST, DEFLATE_POST. See #62021 2012-05-15 11:05:20 +01:00
Sebastian Bergmann
cc7c403a40 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed CODING_STANDARD and move parameter parse code
  Implemented FR #61602 Allow access to name of constant used as default value
2012-05-15 11:12:03 +02:00
Sebastian Bergmann
83449b48d4 Merge branch 'add-const-name' of git://github.com/reeze/php-src into PHP-5.4 2012-05-15 11:08:08 +02:00
Michael Wallner
2d11e55b94 cleanup merge 2012-05-15 09:44:01 +02:00
Michael Wallner
0ad53bfd7d fix bug #60761 zlib.output_compression fails on refresh 2012-05-15 09:33:47 +02:00
Gustavo André dos Santos Lopes
ac33e40d2a Keep date precision in MessageFormatter.
MessageFormatter::parse and MessageFormat::format (and their static
equivalents) now don't throw away better than second precision in the
arguments.

It's already bad enough that in MessageFormatter and IntlDateFormatter we
use seconds since epoch instead of milliseconds since epoch, deviating
from the ICU date representations. But we don't need to throw away extra
precision when parsing dates; we can keep the seconds since epoch
convention and return non integer doubles with only a small BC impact.
Note that we already could return doubles from MessageFormatter::parse if
the date was sufficiently in the past or in the future.
2012-05-13 23:03:07 +02:00
Gustavo André dos Santos Lopes
4015f55389 Merge branch 'fr61871' 2012-05-13 21:36:21 +01:00
Gustavo André dos Santos Lopes
53860672f3 ICU < 4.8 compat in MessageFormatter
Restricted support for named arguments to ICU 4.8+.

Also added bound checks when converting arguments to Formattables.
2012-05-13 20:55:02 +01:00
Gustavo André dos Santos Lopes
43ff66e095 Don't check number of args in msgfmt_do_format
The check does not work reliably across ICU versions when named arguments
are added to the mix. For instance, for recent versions of ICU like 49,
a pattern like "{foo,number} {foo}", has 0 returned from
umsg_format_arg_count(), but for ICU 4.0, this returns 2.
2012-05-13 20:54:55 +01:00
Gustavo André dos Santos Lopes
0295ed7d22 Added new MessageFormatter tests. 2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
1c4f99b988 Better error messages in MessageFormatter::format. 2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
0ad1b14f16 Accept numeric strings for dates.
Refactored umsg_helper_zval_to_millis in the process.
2012-05-13 20:53:06 +01:00
Gustavo André dos Santos Lopes
20dd5ccf19 Cache arguments type info in MessageFormatter. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
407455876e Set global error if insufficient numeric args. WS. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
f1621485ad Fixed MessageFormatter subformat tests. 2012-05-13 20:53:05 +01:00
Gustavo André dos Santos Lopes
edca0e2adb Refactoring of patch for FR #61871. 2012-05-13 20:52:41 +01:00
Gustavo André dos Santos Lopes
c9b913b56b Orig patch for FR #61871 by David Sklar 2012-05-13 20:51:43 +01:00
Rasmus Lerdorf
8da61c62d9 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix grammo
2012-05-13 11:48:25 -07:00
Rasmus Lerdorf
cd16174f14 Fix grammo 2012-05-13 11:45:41 -07:00
Nuno Lopes
8b4b70df56 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:21 -04:00
Nuno Lopes
950d5ee590 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:00 -04:00
Nuno Lopes
5c87ca2d27 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 12:50:29 -04:00
Anatoliy Belsky
d0d7340d50 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
2012-05-10 17:35:09 +02:00
Anatoliy Belsky
b43d6c8522 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
2012-05-10 17:32:21 +02:00
Anatoliy Belsky
266578f584 Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
Exception text differ on windows
2012-05-10 17:07:38 +02:00
Anatoliy Belsky
f6558a295d Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
2012-05-10 15:40:17 +02:00
Anatoliy Belsky
10d5f2301a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
2012-05-10 15:36:47 +02:00
Anatoliy Belsky
f7d8b274c7 Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
What happens here is trivial long overflow. Despite the bug attracted
attention on windows, the same story is on linux. Just wait for a big
anough bucket->key . The linux test had %i to check the key value
which should be %d all the way.
2012-05-10 15:27:44 +02:00
Anatoliy Belsky
e3f2c76989 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
2012-05-09 13:06:47 +02:00
Anatoliy Belsky
f76d7be876 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
2012-05-09 13:04:32 +02:00
Anatoliy Belsky
7fb16d5bd9 Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
Another error message is produced by win specific code
2012-05-09 13:02:33 +02:00
Felipe Pena
4dc9545aaa Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #61978 (Object recursion not detected for classes that implement JsonSerializable)
2012-05-08 21:06:15 -03:00
Felipe Pena
92bc49b2b0 - Fixed bug #61978 (Object recursion not detected for classes that implement JsonSerializable) 2012-05-08 21:05:51 -03:00
Anatoliy Belsky
5fce7fe885 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
2012-05-08 19:36:15 +02:00
Anatoliy Belsky
87fa84abde Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
2012-05-08 19:35:13 +02:00
Matt Ficken
c12fdbde5f Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
Fixed that again for systems having their %SYSTEMROOT% not in
c:\windows
2012-05-08 19:31:41 +02:00
Anatoliy Belsky
d776a933eb Fix bug 61713 check also that mbstring's found any internal_encoding 2012-05-08 18:31:11 +02:00
Anatoliy Belsky
3a4a25358f Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails
There is a logic error in charset detection part for htmlentities.
When mbstring is compiled shared and mbstring.internal_encoding
is set to pass, it prevents default_charset from being checked
resulting iso-8859-1 being choosed.
2012-05-08 17:42:01 +02:00
Johannes Schlüter
544c6f2f22 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix #61704 (Crash apache, phpinfo() threading issue)
  Fix folding marks
2012-05-08 17:30:46 +02:00
Johannes Schlüter
e8e661128a Fix #61704 (Crash apache, phpinfo() threading issue) 2012-05-08 17:30:05 +02:00
Johannes Schlüter
fb3b6bcf83 Fix folding marks 2012-05-08 15:18:33 +02:00
Anatoliy Belsky
2c505ecc57 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails
  Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails
2012-05-07 15:40:48 +02:00
Anatoliy Belsky
09664063a8 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails
  Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails
2012-05-07 15:40:16 +02:00
Anatoliy Belsky
2068419ae5 Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails 2012-05-07 15:39:07 +02:00
Anatoliy Belsky
ce59121c5f Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails 2012-05-07 15:37:29 +02:00
andrey
c75cbd62dd these methods should return a stream. This makes it easier to intercept
the return value
2012-05-07 15:32:00 +02:00
andrey
68536a4167 comment for the #else 2012-05-07 13:55:40 +02:00
andrey
9927cc5f4b Merge branch 'master' of git.php.net:php-src 2012-05-07 13:32:05 +02:00
andrey
ec159081a0 reorganize things a bit...just shifting code 2012-05-07 13:31:42 +02:00