summaryrefslogtreecommitdiff
path: root/ext/standard/tests
Commit message (Collapse)AuthorAgeFilesLines
* Trim trailing whitespace in *.phptPeter Kokot2018-10-142737-8744/+8736
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-1413-13/+8
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in source code filesPeter Kokot2018-10-137-130/+130
|
* Convert CRLF line endings to LFPeter Kokot2018-10-1335-1863/+1863
| | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
* Remove unstable dns testsPedro Magalhães2018-10-062-240/+0
|
* Fix bug #74764 and add a test caseVille Hukkamaki2018-09-041-0/+24
|
* Fixed bug #73457Ville Hukkamaki2018-09-041-0/+23
| | | | Correctly report errors when opening FTP data connection.
* Simplify regression testChristoph M. Becker2018-08-231-17/+9
| | | | | | | There's no need to actually try to trigger an out-of-memory condition to proof the leak; instead we can simply rely on the Zend MM to report the memory leaks in debug mode (at least on Linux). Therefore we simplify the regression test, which also makes it run much faster.
* Increase memory_limit to prevent test failuresChristoph M. Becker2018-08-221-1/+1
|
* Fix #76778: array_reduce leaks memory if callback throws exceptionChristoph M. Becker2018-08-221-0/+26
| | | | We have to release the result variable in the error case, too.
* Fix #76643: Segmentation fault when using `output_add_rewrite_var`Christoph M. Becker2018-07-241-0/+12
| | | | | We have to check whether _SERVER is actually an array before we're going to use it as such.
* Fixed bug #68553 (array_column: null values in $index_key become ↵Xinchen Hui2018-07-241-0/+66
| | | | incrementing keys in result)
* Fix #73817: Incorrect entries in get_html_translation_tableChristoph M. Becker2018-07-153-66/+80
| | | | | | | | Due to incorrect string termination and length handling, several HTML entities missed the trailing semicolon. We also fix the obviously wrong expectations in two already existing tests.
* Fixed RecursiveDirectoryIterator with long path or with edge case lengthAnatol Belski2018-07-121-0/+65
| | | | | | | | | | | The search path needs to be appended with the wild card. Till now, an edge case existed, so then if a path is 259 bytes long, which is smaller _MAX_PATH, the suffix would cause the final search path to become longer than _MAX_PATH. It is an edge case, when the starting path happens to have a specific length. If the starting path was longer than _MAX_PATH or the addition of "\\*" would not exceed _MAX_PATH, the function was correct. Except for rewind, which was broken in the case of the long path.
* Fix string.strip_tags filterNikita Popov2018-07-051-0/+24
| | | | | Was segfaulting if no allowed tags are specified and performing an out of bounds read if they were.
* Fix test after serialization changeNikita Popov2018-07-021-3/+1
| | | | And move it to a more appropriate location.
* Fixed bug #74670Nikita Popov2018-07-022-3/+3
| | | | | | | | Validate that "C" serialization payload is followed by "}" prior to calling the unserialize() handler. This mitigates issues caused by unserialize() not correctly handling strings that are not NUL terminated. Making sure that there is a "}" at the end avoids the problem.
* Fix #71848: getimagesize with $imageinfo returns falseChristoph M. Becker2018-06-302-0/+32
| | | | | | | | | | | | | | | Some JFIF images contain empty APP segments, i.e. those which consist only of the marker bytes and the length, but without actual content. It appears to be doubtful to have empty APP segments, but we should apply the robustness principle, and accept these, instead of simply failing in this case. We choose to add empty APP segments to $imageinfo with an empty string as value, instead of NULL, or even to omit these segments altogether. This patch also fixes the potential issue that php_stream_read() might not read the supposed number of bytes, which could result in garbage to be added to the read value.
* Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)Xinchen Hui2018-06-212-1/+34
|
* Fix bug #76390 - do not allow invalid strings in range()Stanislav Malyshev2018-06-041-3/+11
|
* Fixed bug #76335 "link(): Bad file descriptor" with non-ASCII pathAnatol Belski2018-05-141-0/+52
|
* Sync test with newer outputAnatol Belski2018-03-161-1/+1
| | | | Czech Republic vs. newer Czechia
* Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with ↵Anatol Belski2018-03-101-0/+49
| | | | segfault
* Revert "Fixed bug #75961 (Strange references behavior)"Nikita Popov2018-03-051-18/+0
| | | | | | | | | | | | | This reverts commit 94e9d0a2ae76bad712495d820d3962e401085fef. This code needs to be mindful about modifications to the array happening during callback execution. It was written in a way that only accessed the reference, which is guaranteed not to move. The changed implementation instead accesses the array slot, leading to use-after-free. Run ext/standard/tests/array/bug61967.phpt under valgrind to see the issue.
* Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2018-02-261-0/+32
|\ | | | | | | | | * PHP-7.0: Fix bug #75981: prevent reading beyond buffer start
| * Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2018-02-261-0/+32
| |\ | | | | | | | | | | | | * PHP-5.6: Fix bug #75981: prevent reading beyond buffer start
| | * Fix bug #75981: prevent reading beyond buffer startStanislav Malyshev2018-02-261-0/+32
| | |
* | | Fixed bug #75961 (Strange references behavior)Xinchen Hui2018-02-171-0/+18
| | |
* | | fix bug #75916 DNS_CAA record results contain garbageMichael Wallner2018-02-051-17/+24
| | | | | | | | | | | | | | | It is assumed that DNS_CAA record values are zero terminated, while its length is defined as (RDATA_LENGTH - tag_length - 2).
* | | Fixed bug #75679 Path 260 character problemAnatol Belski2017-12-141-0/+66
| | |
* | | Fixed #73124: php_ini_scanned_files()johnstevenson2017-11-281-0/+24
| | | | | | | | | | | | | | | Additional ini files are reported using the --ini option, but not by `php_ini_scanned_files()`, which relied on PHP_CONFIG_FILE_SCAN_DIR.
* | | Fixed bug #75574 putenv does not work properly if parameter contains ↵Anatol Belski2017-11-272-0/+111
| | | | | | | | | | | | non-ASCII unicode character
* | | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-11-171-0/+31
|\ \ \ | |/ /
| * | Fixed bug #75535Nikita Popov2017-11-171-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sizeof()s for Content-Length and Transfer-Encoding were missing the trailing ":". Apart from being generally wrong, this no longer verified that the header actually contains a colon, leading to the null http_header_value being used. Additionally, in the interest of being defensive, also make sure that http_header_value is non-null by setting it to the end of the header line (effectively an empty string) if there is no colon. If the following conditions are correct, this value is not going to be used though.
* | | Fixed bug #75514 mt_rand returns value outside [$min,$max]+ on 32-bitRemi Collet2017-11-131-0/+12
| | |
* | | Fix mkdir() special case for path length < 260 and > 248Anatol Belski2017-09-281-0/+60
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-09-271-0/+28
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed #75220 - Segfault when calling is_callable on parent
| * | Fixed #75220 - Segfault when calling is_callable on parentNester2017-09-271-0/+28
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-09-121-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix test failure on 32-bit
| * | Fix test failure on 32-bitAnatol Belski2017-09-121-1/+1
| | |
* | | Fix test portabilityAnatol Belski2017-09-113-3/+3
| | | | | | | | | | | | | | | The message comes from the C runtime, so it is not reliable to check the exact wording.
* | | Fixed bug #75152 (signed integer overflow in parse_iv)Xinchen Hui2017-09-113-1/+7
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Remi Collet2017-08-241-8/+8
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: From documentation, only the sign of returned value is relevant
| * | From documentation, only the sign of returned value is relevantRemi Collet2017-08-241-8/+8
| | | | | | | | | | | | With recent glibc, memcmp sometime return a negative value instead of -1
* | | Made test 32/64-bit independentDmitry Stogov2017-08-151-2/+2
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2017-08-151-0/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed bug #75075 (unpack with X* causes infinity loop)
| * | Fixed bug #75075 (unpack with X* causes infinity loop)Xinchen Hui2017-08-151-0/+10
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-08-144-6/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Test cleanup improvements, files might be locked in the test process
| * | Test cleanup improvements, files might be locked in the test processAnatol Belski2017-08-144-6/+21
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-08-141-2/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: fix test cleanup