1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

1076 Commits

Author SHA1 Message Date
Máté Kocsis e699b2865f Fix exception message of implode() 2019-12-12 23:05:12 +01:00
Máté Kocsis beee92a887 Remove support for mixing parameter order in implode() 2019-12-12 13:49:05 +01:00
Máté Kocsis 33f7cabbf0 Promote warnings to exceptions in *scanf() functions 2019-12-10 13:01:59 +01:00
Máté Kocsis b2dc833c1a Only accept string as the format parameter of *printf() functions 2019-12-09 19:43:34 +01:00
George Peter Banyard 5fbd49f9ab Convert Errors to ValueErrors
Closes GH-4930
2019-12-05 14:22:54 +01:00
Máté Kocsis 144b41ce88 Remove money_format() function 2019-12-05 13:15:54 +01:00
Máté Kocsis 64468d1e3b Remove convert_cyr_string() function 2019-12-05 13:15:54 +01:00
Máté Kocsis b63c625260 Remove hebrevc() function 2019-12-05 13:15:54 +01:00
Máté Kocsis d2868edae0 Capitalize the initial letter of the error message of htmlspecialchars() function 2019-12-05 13:15:53 +01:00
Nikita Popov a603c06e2e Support "string or array" in zpp
This is one of our more common argument unions. Usage is just
prototyped in a few places, certainly not a full conversion.

I'm removing the str_replace.phpt test, because aparently it was
split up into smaller tests at some point, but the original has
not been removed.

Closes GH-4970.
2019-12-05 12:25:57 +01:00
Christoph M. Becker 8a5601a364 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:39:58 +01:00
Christoph M. Becker 3356dd0575 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:39:35 +01:00
Christoph M. Becker 861fa60814 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:38:45 +01:00
Christoph M. Becker 600f1f898f Fix #78814: strip_tags allows / in tag name => whitelist bypass
When normalizing tags to check whether they are contained in the set
of allowable tags, we must not strip slashes, unless they come
immediately after the opening `<`, or immediately before the closing
`>`.
2019-12-02 11:37:25 +01:00
Christoph M. Becker 0dba3a8e43 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:37 +01:00
Christoph M. Becker 4ff242a9a7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:07 +01:00
Christoph M. Becker 3d81c54879 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:19:15 +01:00
Christoph M. Becker db420cb6a1 Fix #78833: Integer overflow in pack causes out-of-bound access
We check for potential signed integer overflow, and bail out
gracefully, in that case.
2019-12-02 11:18:19 +01:00
Christoph M. Becker b6e79f3724 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78840: imploding $GLOBALS crashes
2019-11-27 09:34:57 +01:00
Christoph M. Becker 30aa2e8932 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78840: imploding $GLOBALS crashes
2019-11-27 09:33:55 +01:00
Christoph M. Becker fee38633d2 Fix #78840: imploding $GLOBALS crashes
We add support for IS_INDIRECT zvals to implode().
2019-11-27 09:32:16 +01:00
George Peter Banyard 501a72e354 Promote warning to value error in strpbrk()
Closes GH-4598
2019-11-22 00:36:54 +01:00
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov 93ba3abe63 Warn on strtr(["" => "x"])
Previously:
 * If only ["" => "x"] was present, the original string was returned
   without warning.
 * If both ["" => "x"] and at least one more element was present,
   false was returned without warning.

New behavior:
 * Ignore "" keys in the replacement array (and perform any remaining
   replacement).
 * Throw a warning indicating that an empty string replacement has
   been ignored.

Closes GH-4792.
2019-10-30 10:53:45 +01:00
Nikita Popov 778a9c05b6 Try to fix 32-bit fprintf test 2019-10-29 09:52:46 +01:00
kharhamel 82dc9a31c3 Convert warnings to Errors in sprintf() functions
Closes GH-4837.
2019-10-28 11:58:59 +01:00
Colin O'Dell e6d3146bdc Accept null lengths for substr functions()
If a null $length is passed to any of these functions, behave as if no
parameter was passed:

 - substr()
 - substr_count()
 - substr_compare()
 - iconv_substr()
2019-10-22 12:09:04 +02:00
Nikita Popov fdc133063d Convert count_chars invalid mode error to ValueError 2019-10-07 11:10:05 +02:00
Christoph M. Becker 0edcd105f3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78620: Out of memory error
2019-10-04 09:14:36 +02:00
Christoph M. Becker 6627f782d6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-04 09:11:18 +02:00
Christoph M. Becker cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Nikita Popov 2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov c0a54f41b3 Merge branch 'PHP-7.4' 2019-09-30 15:06:51 +02:00
Nikita Popov 1f0ffece91 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-30 15:06:43 +02:00
Nikita Popov 0805e132b0 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-30 15:06:32 +02:00
Nikita Popov 6fcde56b03 Fixed bug #78612 2019-09-30 15:06:07 +02:00
Nikita Popov 8d7911ef56 Standardize type printing in reflection
Use ?T instead of "T or NULL".
2019-09-23 15:40:03 +02:00
George Peter Banyard d0754b86b1 Promote warnings to errors in substr_count() 2019-08-31 23:37:04 +02:00
George Peter Banyard 0240b903c5 Promote warnings to errors in substr_compare() 2019-08-31 23:34:24 +02:00
Nikita Popov f107b670da Add skipifs for zmm 2019-08-27 09:12:22 +02:00
Nikita Popov 085ddd0cde Fix chunk_split test on i386 release 2019-08-27 09:09:03 +02:00
George Peter Banyard 5b09e6043c Remove memory exhaustion checks in php_chunk_split() 2019-08-26 17:14:49 +02:00
George Peter Banyard 6d578482a9 Improve strpos and strstr function family implementation 2019-08-26 17:11:37 +02:00
George Peter Banyard 91f4e2e614 Promote warnings to errors in explode() 2019-08-26 11:35:03 +02:00
Nikita Popov 4c70a585b7 Merge branch 'PHP-7.4' 2019-08-26 10:28:14 +02:00
Nikita Popov bad49e55b9 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 10:27:08 +02:00
Nikita Popov a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov 16d35eb643 Fix overflow in memory limit checks
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
2019-08-26 10:25:30 +02:00
George Peter Banyard 743729d5bf Promote warnings to errors in str_pad() 2019-08-25 20:13:27 +02:00