Adam Harvey [Mon, 18 Oct 2010 02:10:29 +0000 (02:10 +0000)]
Fix bug #53089 (php.ini should use portable example of find) by using POSIX
compliant syntax in the suggested find command for cleaning up session files in
the shipped php.ini files.
marked char pointer arguments as const in lots of
places where strings pointed to are not modified
to prevent compiler warnings about discarded qualifiers ...
- [DOC] Reverted rev #304382 and rev #304380, as I figured out a way to
fix the erratic behavior without breaking backwards compatibility. Namely,
$offset retains SEEK_SET behavior but actually SEEK_CUR is passed to
_php_stream_seek, if possible, by moving the offset stream->position bytes.
- Addresses bug #53006.
- [DOC] Changed stream_get_contents() so that the offset is relative to the
current position (seek with SEEK_CUR, not SEEK_SET). Only positive values are
allowed. This breaking change is necessary to fix the erratic behavior in
streams without a seek handlder. Addresses bug #53006.
#Note that the example on the doc page for stream_get_contents() may fail
#without this change.
#This change is also in the spirit of stream_get_contents(), whose description
#is "Reads all remaining bytes (or up to maxlen bytes) from a stream...".
#Previous behavior allowed setting the file pointer to positions before the
#current one, so they wouldn't be "remaining bytes". The previous behavior was
#also inconsistent in that it allowed an moving to offset 1, 2, ..., but not 0.
- Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
and when there was data in the buffer before the emulation started. Also made
more consistent its behavior -- should return failure every time less data
than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
invalid call to the seek handler or read handler. in _php_stream_seek.
- Added a 3rd parameter to get_html_translation_table. It now takes a charset
hint, like htmlentities et al.
- Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8).
- Fixed bug #25927 (get_html_translation_table calls the ' ' instead of
').
- Fixed tests for get_html_translation_table and unified the Windows and
non-Windows versions of the tests.
- PHP uses a big endian representation when it converts the
code unit sequences to integers so as to store the entity
maps. Code in traverse_for_entities assumed little
endian. Fixed.
(in practice, due to the absence of unicode and entity
mappings for multi-byte encodings -- except UTF-8 --, this
doesn't matter, so the relevant code was commented out for
performance reasons).
- Removed redundant local variable in dns_get_record.
- (5.3) Fixed bug in the Windows implementation of
dns_get_record, where the two last parameters wouldn't be
filled unless the type were DNS_ANY (Gustavo).
- [DOC] Added a 5th parameter to dns_get_record, a boolean that tells whether to activate
"raw mode". In this mide, $type (2nd parameter) is the numeric type of the record, and
the responses are not parsed -- the "type" element will be numeric and there will be
a "data" element with the raw data of the response buffer, which the programmer will
have to parse.
- Fixed bug in the Win32 implementation of dns_get_record, where the 3rd and 4th arguments
would only be filled if the 2nd ($type) was DNS_ANY.
- [DOC] The 3rd and 4th parameters can now be NULL (changed their arginfo).
- Revamp of the decoding portion of html.c.
- Dramatic improvements on the performance of html_entity_decode and htmlspecialchars_decode, as the
string is now traversed only once. Speedups of 20 to 25 times with Windows release builds and a
~250 characters string (for 2nd and subsequent calls).
- Consistent behavior on html_entity_decode. For instance, the entity in "&<" would be decoded,
but not "&é". Not anymore. The code path for "basic" and non-basic entities is now mostly
shared.
- Code of html_entity_decode and htmlspecialchars_decode is now shared.
- [DOC] More consistent behavior of htmlspecialchars_decode. Instead of translating only <, >,
&, ", ' and ', now e.g. ", ', ', ', etc. are also decoded.
- [DOC] Previous translation of unicode code points in numerical entities was seriously broken. When
the code points for some character were not the same in unicode and the target encoding, the
behavior could be an erroneous translation (e.g. 0x80-0xA0 in win-1252) or no translation at all.
Added unicode translation tables for all single-byte encodings. Entities are not translated for
multi-byte entities, except for ASCII characters whose code points are shared. We could add
the huge translation tables (several thousand elements) for those encodings in the future.
- Fixed numerical entities that after # had text accepted by strcol being accepted.
- Much more commented and well-structured code...
- Tests for get_html_translation_table()) are broken. I stared fixing the tests, but then I realized
it was completely helpless because get_html_translation_table() is broken by not handling
multi-byte characters correctly.
- Fixed a typo in rev #304208 (24 instead of 34/'"').
- Improved the test bug53021.phpt to reflect other fixes in rev #304208.
- Updated NEWS to reflect other fixes in rev #304208.
- mysqli.c: Fix unused variables, they are only used in non-mysqlnd mode
- mysqli_api.c (PHP_5_3 only): Fix constness, add_property_string expects a char *, not a const char *
- mysqli_prop.c: Cast to long, as its below the LONG_MAX and therefore safe
- mysqli_result_iterator.c: Cast to ulong as the iterator member expects that rather than a my_longlong
# In trunk only warnings regarding the zend_property_info
# structure is present and PHP_5_3 is warning free now
- Fixed bug #52981 (Unicode casing table was out-of-date).
Updated with UnicodeData-6.0.0d7.txt and included the
source of the generator program with the distribution.
#The replaced tables, generated circa 2002, seem to reflect
#Unicode 3.2. I was unable to generate the same property
#offsets with Unicode 3.2 data, but all the tests I made
#indicate php_unicode_is_prop() is returning the correct
#values. The replaced file merely says it used a "modified
#version" of ucgendat, which is not very helpful. The results
#I got were not significantly different, only slightly higher
#offsets at two properties, which were carried over to the
#subsequent properties.
#I was, however, able to replicate precisely the casing table.
#The extent of the "modifications" besides omitting most of
#the tables, a slightly different layout and the casing table
#offsets having been multiplied by 3 is unclear.
#The test suite showed no regressions; however, it's very poor
#in testing the modified portion of the extension.
Ulf Wendel [Mon, 4 Oct 2010 10:02:58 +0000 (10:02 +0000)]
Sorry for the commit but compiler warnings are annoying and so are white spaces at the end of a line, if one uses an editor which removes them on save and diff's get blown
up by white space changes...
Changes:
- remove end of line white space
- fix compiler warning "ext/mysqli/mysqli_priv.h:156:27: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli_fe.h:135:25: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli.c:896:11: warning: extra tokens at end of #ifdef directive"
- Implemented FR #50692, not uploaded files don't count towards
max_file_uploads limit.
- As a side improvement, temporary files are not opened for
empty uploads and, in debug mode, 0-length uploads.
Felipe Pena [Sun, 3 Oct 2010 16:01:38 +0000 (16:01 +0000)]
- Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8)
# In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII
# characters, even in UTF-8 mode. However, this can be changed by setting
# the PCRE_UCP option.