Xinchen Hui [Sat, 17 Dec 2016 12:09:34 +0000 (20:09 +0800)]
Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
add Appveyor fast_fail
improve error check
turn mcrypt back on for Appveyor runs
add build status badge
add scripts for AppVeyor integration
Silence warning from unhandled enum
fix leaking streams and memory mapped files
turn mcrypt back on for Appveyor runs
add build status badge
add scripts for AppVeyor integration
Silence warning from unhandled enum
fix leaking streams and memory mapped files
Fix stack management in ini scanner
chance CLI codepage, only when SAPI is initialized
Xinchen Hui [Sat, 17 Dec 2016 12:06:18 +0000 (20:06 +0800)]
Reorder the oplines
1. we should only do the return type checking when it is really about to
return
2. for 029.php, actually, the exception threw should be discard while it
jmp into finally(it could be observed by change the return to return an array)
3. after this fix, the test 029.phpt behavior consistently with 7.0
4. good for optimizer too
Anatol Belski [Fri, 16 Dec 2016 23:14:50 +0000 (00:14 +0100)]
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
turn mcrypt back on for Appveyor runs
add build status badge
add scripts for AppVeyor integration
Silence warning from unhandled enum
fix leaking streams and memory mapped files
Anatol Belski [Fri, 16 Dec 2016 15:49:18 +0000 (16:49 +0100)]
chance CLI codepage, only when SAPI is initialized
This finally solves issues with DBSC console codepages, and in
general improves the console codepage switching. When
module_initialized, all the possible encoding INI settings with
regard to possible modifications are set, and that's the
right moment to switch the console codepage in regard to I/O.
CJK glyphs might take more than 1 cell, so then visual issues
can occur, when switching console codepage back and forth. Users
are free to use ini_set(), but any visual issues are then up to
the user responsibility.
Anatol Belski [Thu, 15 Dec 2016 11:20:37 +0000 (12:20 +0100)]
make timing check more forgiving in these tests
Particularly on slower VMs, the sporadic fails can still happen.
The timing is kept in an uncritical range, but allows the tests
pass there. Mayby, it'd make sense to introduce a new group for
this kind of tests, so tests requiring exact time measurement
can be avoided on unsuitable environments.
Anatol Belski [Wed, 14 Dec 2016 01:51:29 +0000 (02:51 +0100)]
Care about intput and output encoding, as per default encoding RFC
If PHP CLI is used with programs with no Unicode support, the default
PHP console codepage might cause backward incompatible behaviors. This
is solved with this patch by separating the handling of I/O codepage.
As per https://wiki.php.net/rfc/default_encoding input_encodnig and
output_encoding are centralized INI settings, so they're used for the
purpose of adjusting the codepage. This gives user the ability to use
UTF-8 internally, while letting the system API to convert the output
to a compatible codepage. This also might solve the font issues on
systems without good true type support.
Note, that there no change to the default behavior - if input and
output encoding are not set, which is the default case, the default
charset applies to both console input and output. The patch is just
a compilment to the backward compatibility, not more and not less.
Nikita Popov [Tue, 13 Dec 2016 16:54:30 +0000 (17:54 +0100)]
More fixes for bug #73089
Insert a lot more DEREFs. Some may not be necessary, but better
safe than sorry. I'm thinking the soap_hash_str_find_deref function
should become part of the zend_hash API -- we need this in many
places.
Andrey Hristov [Mon, 12 Dec 2016 19:11:02 +0000 (21:11 +0200)]
Fix off by 1 problem.
The problem was manifestated only with BIT columns and only when more than
one row was fetched. The problem was coming from the fact that in pre-7.0
times mysqlnd was using a no-copy optimization. This optimization kept the
strings (and also the BIT mask equivalents as strings) in the packet and the
zval referred to them. 7.0+ zvals cannot use no-copy and always copy. Because
of this the allocated memory for the packet was reduced by 1 by the person who
ported the driver, but the starting address of the bit area wasn't reduced.
Because of this the bit_area started at wrong address and the length decoded
wrong.
Nikita Popov [Sun, 11 Dec 2016 12:31:37 +0000 (13:31 +0100)]
Fix T_NUM_STRING negation
T_NUM_STRING follows the rules of symtable numeric string
conversion. If the offset isn't an integer under those rules, it
is treated as a string. This should apply to negated T_NUM_STRINGs
as well.