George Peter Banyard
0719035f9d
Add ValueError for invalid mode in count()
...
Closes GH-5106
2020-01-23 00:14:20 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round
2020-01-19 18:28:43 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880 : Final spelling fixes
2020-01-16 19:14:31 +01:00
Máté Kocsis
c3cf01b553
Fix #78880 : Yet another batch of spelling errors
2020-01-16 12:04:00 +01:00
Máté Kocsis
0b4778c377
Fix #78880 : Another bunch of spelling errors
2020-01-16 09:46:47 +01:00
Christoph M. Becker
c13077a895
Fix test
...
The typo in the echoed string had been fixed in master; fix the
expectation as well.
2020-01-09 18:40:58 +01:00
Christoph M. Becker
b2aac6cc3a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix useless tests
2020-01-09 17:44:41 +01:00
Christoph M. Becker
cfa9e5e05e
Fix useless tests
...
These tests are certainly not supposed to fail due to a typo in the
class names, but expect this failure. We fix the typos and the
expectations.
2020-01-09 17:42:22 +01:00
Christoph M. Becker
dabc28d182
Fix #78880 : Spelling error report
...
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.
[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html >.
2019-12-21 11:58:00 +01:00
George Peter Banyard
f03d311f1a
Capitalize first character of error message.
2019-12-05 14:22:53 +01:00
George Peter Banyard
5fbd49f9ab
Convert Errors to ValueErrors
...
Closes GH-4930
2019-12-05 14:22: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
e9bdb5cd08
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove outdated comments in test
2019-11-07 14:06:53 +01:00
Nikita Popov
aba89f56ff
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Remove outdated comments in test
2019-11-07 14:06:48 +01:00
Nikita Popov
29f4939923
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Remove outdated comments in test
2019-11-07 14:06:33 +01:00
Nikita Popov
ee243bc471
Remove outdated comments in test
2019-11-07 14:06:23 +01:00
Nikita Popov
0027ad4801
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78759
2019-11-07 11:17:38 +01:00
Nikita Popov
aed4f6e849
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #78759
2019-11-07 11:17:14 +01:00
Nikita Popov
8d2a9d8859
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed bug #78759
2019-11-07 11:16:24 +01:00
Nikita Popov
5fa6dcd972
Fixed bug #78759
...
Handle INDIRECT values in array.
2019-11-07 11:15:29 +01:00
Máté Kocsis
14bdb0cfc7
Fix consistency issues with array accesses warnings/exceptions
...
* Change a number of "resource used as offset" notices to warnings,
which were previously missed.
* Throw the "resource used as offset" warning for isset() as well.
* Make array_key_exists() behavior with regard to different key
types consistent with isset() and normal array accesses. All key
types now use the usual coercions and array/object keys throw
TypeError.
Closes GH-4887.
2019-11-06 12:56:47 +01:00
Nikita Popov
c46b2ed677
Remove support for array_key_exists() with objects
2019-11-04 13:10:03 +01:00
Tyson Andre
e7ff590d0d
Optimize array_slice for packed arrays with large offsets
...
If the offset is 100000, and there are no gaps in the packed/unpacked array,
then advance the pointer once by 100000,
instead of looping and skipping 100000 times.
Add a new test of array_slice handling unset offsets.
Closes GH-4860.
2019-10-28 11:30:59 +01:00
Colin O'Dell
e7335eb420
Allow array_splice() length to be null
2019-10-23 11:22:12 +02:00
George Peter Banyard
d5e9ef8f0f
Promote warnings to error in array_flip()
...
Closes GH-4576.
2019-10-02 12:31:02 +02:00
George Peter Banyard
1ca4ab09a5
Promote warnings to errors in array_push()
...
This is in line with the engine change from
https://wiki.php.net/rfc/engine_warnings .
2019-10-02 10:38:23 +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
0ebf2bdba0
Convert "Illegal offset type" warnings to exceptions
2019-09-27 13:00:07 +02:00
Nikita Popov
34e7c2daf0
Merge branch 'PHP-7.4'
2019-09-27 10:49:25 +02:00
Nikita Popov
a6c9c7c2b8
Handle resources used as array keys consistently
...
Resources used as array keys are generally handled by throwing a
notice and converting the resource to the resource handle. The only
exception is the [$resource => null] syntax, where this was treated
as an illegal offset type instead. However, this also only happened
for VM evaluations, the AST evaluator did handle resources correctly.
2019-09-27 10:40:41 +02:00
George Peter Banyard
f816171240
Indicate entry is skipped in error message
2019-09-18 22:30:12 +02:00
George Peter Banyard
62751b0d45
Promote warnings to errors in array_walk(_recursive)()
2019-08-29 16:02:59 +02:00
George Peter Banyard
81277a104c
Promote warnings to errors in compact()
2019-08-29 16:02:20 +02:00
George Peter Banyard
20edea5a85
Promote warnings to errors in array_merge(_recursive)() and array_replace()
2019-08-29 16:01:39 +02:00
George Peter Banyard
70e604ee46
Promote warnings to errors in extract()
2019-08-28 23:15:01 +02:00
George Peter Banyard
9fc3d5da11
Promote warnings to errors in max()
2019-08-27 23:41:22 +02:00
George Peter Banyard
b91a881b32
Promote warnings to errors in min()
2019-08-27 23:38:22 +02:00
George Peter Banyard
c1c8538f95
Promote warnings to errors in array_rand()
2019-08-26 13:31:02 +02:00
George Peter Banyard
675e975185
Promote warning to error in zend_forbid_dynamic_call()
2019-08-23 20:01:51 +02:00
George Peter Banyard
c1fcf2d616
Promote warnings to errors in array_pad()
2019-08-22 19:30:20 +02:00
George Peter Banyard
7dcbcd4ca5
Promote warnings to errors in array_column()
2019-08-22 19:27:47 +02:00
George Peter Banyard
7d4e3dc32d
Promote warnings to errors in array_combine()
2019-08-21 18:12:56 +02:00
George Peter Banyard
eaf66df517
Promote warnings to errors in array_multisort()
2019-08-21 18:10:13 +02:00
George Peter Banyard
c70f92caf8
Promote warning to error in array_chunk()
2019-08-21 18:07:35 +02:00
George Peter Banyard
7c6acc2eef
Promote warnings to errors in range()
2019-08-21 18:05:08 +02:00
Nikita Popov
36db71df47
Merge branch 'PHP-7.4'
2019-07-22 12:28:40 +02:00
Nikita Popov
0ba7c3eadf
Deprecate array_key_exists() on objects
2019-07-22 11:39:52 +02:00
Nikita Popov
106f71cc94
Merge branch 'PHP-7.4'
2019-07-10 12:05:24 +02:00
Nikita Popov
c42b7dd6d3
Throw notice on array access on illegal type
...
No notice is thrown for list() accesses, because we did not come
to an agreement regarding patterns like
while ([$key, $value] = yield $it->next()) { ... }
where silent null access may be desirable.
No effort is made to suppress multiple notices in access chains
likes $x[0][0][0], because the technical complexity this causes
does not seem worthwhile.
RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
2019-07-10 12:02:14 +02:00