summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gen_stub: Also verify implementation-aliasNikita Popov2021-01-199-7/+19
| | | | | | | | This makes --verify also check @implementation-alias. Failures are ignored using @no-verify instead. Some mistakes have been made that would have been caught by this... Closes GH-6615.
* Merge branch 'PHP-8.0'Nikita Popov2021-01-183-4/+4
|\ | | | | | | | | * PHP-8.0: SplFileObject::fgets() cannot return false
| * SplFileObject::fgets() cannot return falseNikita Popov2021-01-183-4/+4
| | | | | | | | | | spl_filesystem_file_read() is called with silent=0, so it will throw on failure.
* | gen_stub: Don't use $aliasMap during verificationNikita Popov2021-01-182-2/+7
| | | | | | | | | | | | | | | | | | Some functions have multiple aliases, while the $aliasMap can only record one. Methodsynopsis generation probably shouldn't use it either, but at least that case seems to only be interested in whether there is an alias at all.
* | Merge branch 'PHP-8.0'Nikita Popov2021-01-182-4/+4
|\ \ | |/ | | | | | | * PHP-8.0: Sync gzgets signature with fgets
| * Sync gzgets signature with fgetsNikita Popov2021-01-182-4/+4
| |
* | Use ENT_QUOTES|ENT_SUBSTITUTE default for HTML encoding and decoding functionsCraig Francis2021-01-1814-35/+41
| | | | | | | | | | | | | | htmlspecialchars() etc now use ENT_QUOTES | ENT_SUBSTITUTE rather than ENT_COMPAT by default. Closes GH-6583.
* | gen_stub: Compare phpdoc return type in --verifyNikita Popov2021-01-181-5/+6
| |
* | Merge branch 'PHP-8.0'Nikita Popov2021-01-186-7/+7
|\ \ | |/ | | | | | | | | | | * PHP-8.0: Sync datefmt_get_calendar_object signature Sync intlcal_create_instance() and IntlCalendar::createInstance() Sync date_diff and DateTime::diff return type
| * Sync datefmt_get_calendar_object signatureNikita Popov2021-01-182-2/+2
| | | | | | | | | | In this case, it's only a matter of using the same type order in both cases.
| * Sync intlcal_create_instance() and IntlCalendar::createInstance()Nikita Popov2021-01-182-2/+2
| | | | | | | | | | | | Remove the explicit mention of IntlGregorianCalendar in the latter. It is a subclass of IntlCalendar, and as such covered if only IntlCalendar is used as the return type.
| * Sync date_diff and DateTime::diff return typeNikita Popov2021-01-182-3/+3
| | | | | | | | This function/method cannot return false.
* | Merge branch 'PHP-8.0'Nikita Popov2021-01-182-5/+3
|\ \ | |/ | | | | | | * PHP-8.0: Fix parameter name of PharData::getMetadata()
| * Fix parameter name of PharData::getMetadata()Nikita Popov2021-01-182-5/+3
| | | | | | | | The name should be the same as for Phar::getMetadata().
* | gen_stub: Allow additional text after @returnNikita Popov2021-01-181-1/+1
| | | | | | | | In case the stub file also contains documentation.
* | gen_stub: Automatically add function name to exceptionsNikita Popov2021-01-181-106/+109
| | | | | | | | | | This makes sure that it's present even on exceptions from deeper down the stack, where we can't add it manually.
* | Merge branch 'PHP-8.0'Nikita Popov2021-01-182-10/+7
|\ \ | |/ | | | | | | * PHP-8.0: Fix stub for Phar::setStub()
| * Fix stub for Phar::setStub()Dylan K. Taylor2021-01-182-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | This fixes multiple issues: * The first parameter may be resource|string. * It's an overloaded signature. The second parameter cannot be passed if the first one is a string. Use UNKNOWN default value for that reason. * Make parameter names in PharData::setStub() match those in Phar. Closes GH-6596.
* | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-183-1/+39
|\ \ | |/ | | | | | | * PHP-8.0: Fix #80595: Resetting POSTFIELDS to empty array breaks request
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-01-184-1/+42
| |\ | | | | | | | | | | | | * PHP-7.4: Fix #80595: Resetting POSTFIELDS to empty array breaks request
| | * Fix #80595: Resetting POSTFIELDS to empty array breaks requestChristoph M. Becker2021-01-184-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mainly to work around https://github.com/curl/curl/issues/6455, but not building the mime structure for empty hashtables is a general performance optimization, so we do not restrict it to affected cURL versions (7.56.0 to 7.75.0). The minor change to bug79033.phpt is unexpected, but should not matter in practice. Closes GH-6606.
* | | posix: adding freebsd specific rlimit constantsDavid Carlier2021-01-182-0/+18
| | | | | | | | | | | | | | | | | | Respectively number of kqueues, pty limits per user. Closes GH-6608.
* | | Remove redundant posix_getrlimit_basic.phptNikita Popov2021-01-181-20/+0
| | | | | | | | | | | | | | | It is identical to posix_getrlimit.phpt, apart from one extra message being printed.
* | | Fix memsize check for xxh32Nikita Popov2021-01-182-2/+2
| | | | | | | | | | | | | | | | | | | | | Copy-paste mistake: The memsize limit for xxh32 should be 16, rather than 32 (which is correct for xxh64). Probably fixes oss-fuzz #29661.
* | | Fix $GLOBALS[] in isset and unsetNikita Popov2021-01-183-0/+24
| | | | | | | | | | | | | | | | | | | | | I've previously addressed the case of assignments, but the same issue exists for isset and unset. Fixes oss-fuzz #29699.
* | | hrtime implementation update for MacDavid CARLIER2021-01-181-10/+3
| | | | | | | | | | | | | | | | | | Using a more modern and simpler api available since Sierra (2016). Closes GH-6609.
* | | Curl: Add CURLOPT_DOH_URL optionAyesh Karunaratne2021-01-182-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From libcurl version 7.62.0 and later, it supports DNS-over-HTTPS with [`CURLOPT_DOH_URL`](https://curl.se/libcurl/c/CURLOPT_DOH_URL.html) option. This adds integration with the `CURLOPT_DOH_URL` option if libcurl version is >= 7.62.0 (0x073E00). For reference, Ubuntu 20.04+ `libcurl4-openssl-dev`-based PHP builds use Curl 7.68. Closes GH-6612.
* | | NEWS: Fix typo [ci skip]Anatol Belski2021-01-171-1/+1
| | | | | | | | | | | | Signed-off-by: Anatol Belski <ab@php.net>
* | | Skip bug77423 if filter extension is unavailable.Tyson Andre2021-01-171-0/+2
| | |
* | | Remove useless constant MBFL_ENCTYPE_MBCSAlex Dowad2021-01-1530-49/+42
| | | | | | | | | | | | | | | | | | This flag indicated that an encoding was 'multi-byte'; it can use a variable number of bytes to encode each character. As it turns out, we don't actually need to check this flag anywhere, so it's better to remove it.
* | | Remove unused macros from mbfilter_cp51932.c, mbfilter_iso2022jp_mobile.cAlex Dowad2021-01-152-14/+0
| | |
* | | Remove useless mbstring encoding 'JIS-ms'Alex Dowad2021-01-154-198/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MicroSoft invented three encodings very similar to ISO-2022-JP/JIS7/JIS8, called CP50220, CP50221, and CP50222. All three are supported by mbstring. Since these encodings are very similar, some code can be shared. Actually, conversion of CP50220/1/2 to Unicode is exactly the same operation; it's when converting from Unicode to CP50220/1/2 that some small differences arise in how certain katakana are handled. The most important common code was a function called `mbfl_filt_wchar_jis_ms`. The `jis_ms` part doubtless refers to the fact that these encodings are modified versions of 'JIS' invented by 'MS'. mbstring also went a step further and exported 'JIS-ms' to userland as a separate encoding from CP50220/1/2. If users requested 'JIS-ms' conversion, they got something like CP50220/1/2, minus their special ways of handling half-width katakana when converting from Unicode. But... that 'encoding' is not something which actually exists in the world outside of mbstring. CP50220/1/2 do exist in MicroSoft software, but not 'JIS-ms'. For a text encoding conversion library, inventing new variant encodings and implementing them is not very productive. Our interest is in handling text encodings which real people actually use for... you know, storing actual text and things like that.
* | | Remove useless mbstring encoding 'CP50220-raw'Alex Dowad2021-01-154-61/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CP50220 is a variant of ISO-2022-JP invented by MicroSoft, which handles some Unicode characters which are not representable in ISO-2022-JP by converting them to similar characters which are representable. What, then, is CP50220-raw? An Internet search turns up absolutely nothing. Reference works which I consulted don't say anything about it. Other text conversion libraries don't support it. From looking at the code: It's just the same as CP50220, but it accepts unmapped JIS X 0208 characters passed through from other Japanese encodings and silently encodes them using the usual ISO-2022-JP escape sequence and representation for JIS X 0208 characters. It's hard to see how this could be useful. OK, let me come out and say it: it's _not_ useful. We can confidently jettison this (mis)feature.
* | | CP5022{0,1,2}: treat truncated multibyte characters as errorAlex Dowad2021-01-152-3/+20
| | |
* | | Add test suite for CP5022{0,1,2}Alex Dowad2021-01-151-0/+286
| | |
* | | Protect against buffer overflow in xxhash unserializationNikita Popov2021-01-152-2/+62
| | | | | | | | | | | | | | | | | | We need to make sure that memsize is < 32 bytes. Fixes oss-fuzz #29538.
* | | Limit unserialization element count more aggressivelyNikita Popov2021-01-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is slightly more aggressive about rejecting obviously incorrect element counts. Previously the number of elements was allowed to match the number of characters. Now it is the number of characters divided by two (this can actually be increased further to at least 4). This doesn't really matter in the grand scheme of things (as it just cuts maximum memory usage by half), but should fix oss-fuzz #29356.
* | | Check for append to $GLOBALSNikita Popov2021-01-152-0/+14
| | | | | | | | | | | | Fixes oss-fuzz #29389.
* | | Replace zend_bool uses with boolNikita Popov2021-01-15368-2001/+2001
| | | | | | | | | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | | Print "interned" instead of fake refcount in debug_zval_dump()Nikita Popov2021-01-1515-109/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | debug_zval_dump() currently prints refcount 1 for interned strings and arrays, which does not really reflect the truth. These values are not refcounted, so the refcount is misleading. Instead print an "interned" tag. Closes GH-6598.
* | | Build PDO OCI and OCI8 on azureNikita Popov2021-01-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extensions are build as shared to only check that they compile, without running tests. The OCI8 extension does not properly SKIPIF no database is available. It should be noted that if we do want to also test these, then (apart from running a database) it will also be necessary to configure with LIBS="-Wl,--disable-new-dtags" in order to force the use of RPATH instead of RUNPATH, the latter of which does not affect dlopened libraries. Using LD_LIBRARY_PATH does not mesh well with our test suite. Closes GH-6604.
* | | Fix misleading indentation warning in pdo_ociNikita Popov2021-01-151-4/+5
| | |
* | | compare_function() returns zend_resultNikita Popov2021-01-151-1/+1
| | |
* | | Remove the convert_to_long_base functionNikita Popov2021-01-152-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function is unused in php-src, and has somewhat dubious semantics, especially since we switched convert_to_long to not use strtol for the base 10 case. If you want to convert strings from a different base, use ZEND_STRTOL directly.
* | | CP5022{0,1,2}: treat unrecognized escapes as errorAlex Dowad2021-01-151-4/+4
| | |
* | | CP5022{0,1,2}: use JISX0201 for U+203E (overline)Alex Dowad2021-01-151-11/+7
| | | | | | | | | | | | Same issue as d497c0e96f addressed for JIS7/JIS8, but for CP5022{0,1,2} this time.
* | | CP5022{0,1,2}: convert Unicode codepoints in 'user' area (0xE000-E757) correctlyAlex Dowad2021-01-151-31/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unicode has a range of 'private' codepoints which individual applications can use for their own purposes. When they were inventing CP932, MicroSoft mapped these 'private' or 'user' codepoints to ten new rows added to the JIS X 0208 character table. (JIS X 0208 is based on a 94x94 table; MS used rows 95-114 for private characters.) `mbfl_filt_conv_wchar_jis_ms` converted these private codepoints to rows 85-94 rather than 95-114. The code included a link to a document on the OpenGroup web site, dating back to 1996 [1], which proposed mapping private codepoints to these rows. However, that is not consistent with what mbstring does when converting CP5022x to Unicode. There seems to be a dearth of information on CP5022x on the web. However, I did find one (Japanese-language) page on CP50221, which states that it maps kuten codes 0x7F21-0x927E to the 'private' Unicode codepoints [2]. As a side note, using rows higher than 95 does seem to defeat one purpose of using an ISO-2022-JP variant: ISO-2022-JP was specifically designed to be "7-bit clean", but once you go beyond row 95, the ku codes are 0x80 and up, so 8 bits are needed. [1] https://web.archive.org/web/20000229180004/http://www.opengroup.or.jp/jvc/cde/ucs-conv.html [2] https://www.wdic.org/w/WDIC/Microsoft%20Windows%20Codepage%20%3A%2050221
* | | CP5022{0,1,2}: convert characters in ku 0x2D (13th row) correctlyAlex Dowad2021-01-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, CP5022{0,1,2} are to CP932 as ISO-2022-JP is to Shift-JIS. As Shift-JIS and ISO-2022-JP both encode characters from the JIS X 0208 charset, CP932 and CP5022x both encode characters from JIS X 0208 _plus_ extra characters added as MicroSoft vendor extensions. Among the added characters are a number of symbols which MS put in the 13th row of the 94x94 character table. (In JIS X 0208, that row is empty.) mbfilter_cp50220x.c had an `if` clause which was intended to handle the conversion of characters in that 13th row, but it was dead code, as the previous clause was always true in those cases. The solution is to reverse the order of those two clauses (just as they already appeared in mbfilter_cp932.c).
* | | Stricter handling of erroneous input when converting CP5022{0,1,2} text encodingAlex Dowad2021-01-151-10/+2
| | | | | | | | | | | | | | | | | | Don't allow escape sequences to start in the middle of a multibyte character. Also, don't silently pass through illegal bytes which appear where the 2nd byte of a multibyte character should be.
* | | [skip-ci] Add minimal build instruction for FedoraGeorge Peter Banyard2021-01-151-2/+7
| | |