* upstream/master:
Generators & UPGRADING
Capitalize the warning message
Rearrange the codes, remove empty lines
Provide a specific error message if date.timezone value is invalid.
regenerate patch, and save a strlen
Fix the wrong use of snprintf which is introduced in 1d2f619049
Fixed unintendent clearance of PHP_OUTPUT_ACTIVATED flag
Fix doc bug #63032 (Number of release in documentation).
fixed test for bug #52944 also for darwin
-enable VC11 (vc2012)
- Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
year++
correct PHP version & year++
Correct PHP version
year++
- fix build, there was no tsrm context there, doing a fetch but this is horribly slow, this fix needs improvement (or simply add a TSRM context in the signature in master
- fix build, declarations must be 1st in a contextgit checkout -f master
Fixed bug #62907 (Double free when use traits)
Fixed bug #62991 (Segfault with generator and closure)
* upstream/master: (393 commits)
forked two tests for windows
Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
Bug #49510: Boolean validation fails with FILTER_NULL_ON_FAILURE with empty string or false
Implemented ReflectionFunction::isGenerator()
Allow null as a default value for length in mb_substr() and mb_strcut()
Allow null as a default value for length in mb_substr() and mb_strcut()
folder
Initializing optional argument description in assert()
Initializing optional argument description in assert()
Fix test failed due to new Token T_YIELD
fix NEWS
Fix leak when yielding array as key
Drop obsolete test
Remove extra blank in notice message, should act as same as vm
Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables)
assert() user message
...
* generators: (70 commits)
Fix typos
Fix segfault when traversing a by-ref generator twice
Make sure that exception is thrown on rewind() after closing too
Remove implementation stubs for yield delegation
Fix several issues and allow rewind only at/before first yield
Run finally if generator is closed before finishing
Finally with return now works in generators too
Add dedicated opcode for returns from a generator
Disallow serialization and unserialization
Fix zts build (typo)
Drop Generator::close() method
Forgot to add test
Support trivial finally in generators (no yield, no return)
Fix implementation of Iterator interface
Add T_YIELD in tokenizer_data.c
Throw error also for return occuring before yield
Fix throwing of exceptions within a generator
Remove reference restrictions from foreach
Require parenthesis around yield expressions
Add some more tests
...
Added 2nd, optional, param to assert. When passed in it will be added
to the printed warnings and passed as a 4th param to a callback. PR 150
by Lonny Kapelushnik
Added 2nd, optional, param to assert. When passed in it will be added
to the printed warnings and passed as a 4th param to a callback. PR 150
by Lonny Kapelushnik
This is just an intial merge. It does not yet make generators and finally
work together.
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
Zend/zend_vm_execute.skl
Zend/zend_vm_opcodes.h
* pull-request/132:
OK, bye bye JavaScript, let's just include credits before license
Nicer (JSLint-compliant!) credits reveal JavaScript
Removed now-unnecessary expose_php checks for logo
Fixed small misalignment in prev commit
Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
After commit 3e62aae1, number_format() returns string with length,
but _php_math_number_format_ex_len() didn't set string length
on nan and inf. This cause segfault when destruct the return value.
- removed php_logo_guid()
- removed php_egg_logo_guid()
- removed php_real_logo_guid()
- removed zend_logo_guid()
- removed logo GUID handling
- removed logo GUIDs from source
- added logo data URIs instead for phpinfo()
- added credits to phpinfo() page, but hidden by default
* upstream/master: (34 commits)
Fixed Bug #62500 (Segfault in DateInterval class when extended)
Fixed test bug #62312 (warnings changed one more time)
fix valgrind warning
fix valgrind warning
fixed#62433 test for win
update NEWS
Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
appease MSVC (doesnt like unary minus of unsigned ints)
appease MSVC (doesnt like unary minus of unsigned ints)
appease MSVC (doesnt like unary minus of unsigned ints)
- Fixed bug #62507 (['REQUEST_TIME'] under mod_php5 returns miliseconds instead of seconds)
Fixed Bug #62500 (Segfault in DateInterval class when extended)
Added in NEWS and UPGRADING for feature 55218
Fix two issues with run-tests.php
Fix potential integer overflow in nl2br
Fix potential integer overflow in bin2hex
This wil be PHP 5.3.16
Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially not if they aren't in 5.4, too.
fix (signed) integer overflow (part of bug #52550
fix (signed) integer overflow (part of bug #52550
...
The buffer size was calculated manually, thus creating integer overflows
for very large inputs, e.g. nl2br(str_repeat("\n", 613566757)).
The code now uses safe_emalloc, thus making the code throw an error
instead of crashing.
The code was already using safe_emalloc but did the multiplication in
the first argument, thus making the use of safe_emalloc pretty useless.
The *2 is now moved to the second argument.
Use salt_len_in instead of strlen(salt) or PHP_MAX_SALT_LEN, otherwise too
much memory will be allocated.
sha512 has a 86 character checksum, not 43. That probably was a copy&paste
from the sha256 code which indeed has 43.
The allocation also was using sizeof(char *), thus allocating 4 or 8 times
as much memory as necessary. The sizeof(char *) was removed in the 5.4
branch in b7a92c9 but forgotten on 5.3.
The memset 0 call was using PHP_MAX_SALT_LEN which can be smaller than the
output buffer and thus not zeroing out everything. Use the size of the
output buffer (needed) instead.
base64_encode used safe_emalloc, but one of the arguments was derived from a
multiplication, thus making the allocation unsafe again.
There was a size check in place, but it was off by a factor of two as it
didn't account for the signedness of the integer type.
The unsafe allocation is not exploitable, but still causes funny behavior
when the sized overflows into a negative number.
To fix the issue the *4 factor is moved into the size argument (where it is
known to be safe), so safe_emalloc can carry out the multiplication.
The size check is removed as it doesn't really make sense once safe_emalloc
works correctly. (Would only cause base64_encode to silently return false
instead of throwing an error. Also could cause problems with other uses of
the base64 encoding API, which all don't check for a NULL return value.)
Furthermore the (length + 2) < 0 check is replaced with just length < 0.
Allowing lengths -2 and -1 doesn't make sense semantically and also is not
honored in the following code (negative length would access unallocated
memory.)
Actually the length < 0 check doesn't make sense altogether, but I left it
there just to be safe.
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]
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.