summaryrefslogtreecommitdiff
path: root/ext/standard/tests
Commit message (Collapse)AuthorAgeFilesLines
* Trim trailing whitespace in *.phptPeter Kokot2018-10-142741-8746/+8738
|
* 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-132-99/+99
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'PHP-7.1' into PHP-7.2Pedro Magalhães2018-10-062-240/+0
|\ | | | | | | | | * PHP-7.1: Remove unstable dns tests
| * Remove unstable dns testsPedro Magalhães2018-10-062-240/+0
| |
* | Fix #76888 - Remove unstable testPedro Magalhães2018-10-061-42/+0
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Joe Watkins2018-09-041-0/+24
|\ \ | |/ | | | | | | * PHP-7.1: Fix bug #74764 and add a test case
| * Fix bug #74764 and add a test caseVille Hukkamaki2018-09-041-0/+24
| |
* | Fixed bug #76833, backport change to stream_socket_enable_crypto-win32.phpt ↵Anatol Belski2018-09-042-75/+1
| | | | | | | | | | | | | | from 7.3 It would probably be better to remove this test as it's too much maintanance for a little gain.
* | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-09-041-0/+23
|\ \ | |/
| * Fixed bug #73457Ville Hukkamaki2018-09-041-0/+23
| | | | | | | | Correctly report errors when opening FTP data connection.
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-231-17/+9
|\ \ | |/ | | | | | | * PHP-7.1: Simplify regression test
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-221-1/+1
|\ \ | |/ | | | | | | * PHP-7.1: Increase memory_limit to prevent test failures
| * Increase memory_limit to prevent test failuresChristoph M. Becker2018-08-221-1/+1
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-221-0/+26
|\ \ | |/ | | | | | | * PHP-7.1: Fix #76778: array_reduce leaks memory if callback throws exception
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-07-241-0/+12
|\ \ | |/ | | | | | | * PHP-7.1: Fix #76643: Segmentation fault when using `output_add_rewrite_var`
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2018-07-241-0/+66
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)
| * Fixed bug #68553 (array_column: null values in $index_key become ↵Xinchen Hui2018-07-241-0/+66
| | | | | | | | incrementing keys in result)
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-07-153-66/+80
|\ \ | |/ | | | | | | * PHP-7.1: Fix #73817: Incorrect entries in get_html_translation_table
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-07-121-0/+65
|\ \ | |/ | | | | | | * PHP-7.1: Fixed RecursiveDirectoryIterator with long path or with edge case length
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-051-0/+24
|\ \ | |/
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-021-3/+1
|\ \ | |/
| * Fix test after serialization changeNikita Popov2018-07-021-3/+1
| | | | | | | | And move it to a more appropriate location.
* | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-022-3/+3
|\ \ | |/
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-06-302-0/+32
|\ \ | |/ | | | | | | * PHP-7.1: Fix #71848: getimagesize with $imageinfo returns false
| * 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.
* | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2018-06-212-1/+34
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)
| * Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)Xinchen Hui2018-06-212-1/+34
| |
* | Fix #76300 - Dont attempt to change visibility of a parent privatePedro Magalhães2018-06-171-0/+29
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2018-06-041-3/+11
|\ \ | |/ | | | | | | * PHP-7.1: Fix bug #76390 - do not allow invalid strings in range()
| * Fix bug #76390 - do not allow invalid strings in range()Stanislav Malyshev2018-06-041-3/+11
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-05-141-0/+52
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug #76335 "link(): Bad file descriptor" with non-ASCII path
| * Fixed bug #76335 "link(): Bad file descriptor" with non-ASCII pathAnatol Belski2018-05-141-0/+52
| |
* | Add missing skip prefix for some SKIPIF messagesatvoicu2018-03-235-5/+5
| |
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-03-161-1/+1
|\ \ | |/ | | | | | | * PHP-7.1: Sync test with newer output
| * Sync test with newer outputAnatol Belski2018-03-161-1/+1
| | | | | | | | Czech Republic vs. newer Czechia
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-03-101-0/+49
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
| * Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with ↵Anatol Belski2018-03-101-0/+49
| | | | | | | | segfault
* | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-03-051-18/+0
|\ \ | |/
| * 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.1' into PHP-7.2Stanislav Malyshev2018-02-261-0/+32
|\ \ | |/ | | | | | | * PHP-7.1: Fix bug #75981: prevent reading beyond buffer start
| * 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