Xinchen Hui
2b1d79ce66
Fixed bug #76713 (Segmentation fault caused by property corruption)
2018-08-07 12:36:36 +08:00
Xinchen Hui
3ca9aaf24e
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Update NEWs
Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)
Conflicts:
ext/standard/array.c
2018-07-24 11:37:09 +08:00
Xinchen Hui
2a181b5ea0
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)
2018-07-24 11:35:22 +08:00
Xinchen Hui
38d97557da
Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)
2018-07-24 11:34:57 +08:00
Enno Woortmann
50516a6e1f
Add implementation and tests for new methods - array_key_first(array $a) Returns the key of the first element or null - array_key_last(array $a) Returns the key of the last element or null
2018-07-17 11:31:00 +02:00
Andrea Faulds
e4e9cd8355
Export stdClass objects using (object) cast ( fixes #48016 )
...
Before this change, var_export()'s output for stdClass objects calls
the non-existent stdClass::__set_state method, and is therefore useless.
This commit makes var_export() output an (object) cast from an array
instead, which when evaluated, will produce a stdClass object. Other
classes see unchanged output.
2018-07-12 13:22:26 +02:00
Xinchen Hui
8b2f40724b
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Update NEWS
Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)
2018-06-21 17:26:57 +08:00
Xinchen Hui
939e1095f2
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)
2018-06-21 17:26:27 +08:00
Xinchen Hui
6531719da5
Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys)
2018-06-21 17:26:05 +08:00
Gabriel Caruso
fc775f6915
Report unknown variables passed to compact()
2018-06-19 12:50:15 +02:00
Stanislav Malyshev
c12fc77bdf
Fix bug #76390 - do not allow invalid strings in range()
2018-06-04 22:54:03 -07:00
Stanislav Malyshev
5fbb0988d1
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix bug #76390 - do not allow invalid strings in range()
2018-06-04 22:51:38 -07:00
Stanislav Malyshev
73bf238507
Fix bug #76390 - do not allow invalid strings in range()
2018-06-04 22:44:05 -07:00
timurib
f7f48643e7
Remove redundant warning in array_push() and array_unshift()
...
Cf. https://github.com/php/php-src/pull/3011 .
2018-03-25 17:49:04 +02:00
Dmitry Stogov
8598240c69
Fixed a behavior break introduced by d7f2dc4ec6
2018-03-22 16:37:34 +03:00
Nikita Popov
4838e9799f
Merge branch 'PHP-7.2'
2018-03-05 15:33:34 +01:00
Nikita Popov
634a1ff033
Merge branch 'PHP-7.1' into PHP-7.2
2018-03-05 15:32:39 +01:00
Nikita Popov
fd5bd37ab1
Revert "Fixed bug #75961 (Strange references behavior)"
...
This reverts commit 94e9d0a2ae .
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.
2018-03-05 15:32:21 +01:00
Gabriel Caruso
ded3d984c6
Use EXPECT instead of EXPECTF when possible
...
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Xinchen Hui
55ef99e3b8
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Update NEWS
Fixed bug #75961 (Strange references behavior)
Conflicts:
ext/standard/array.c
2018-02-17 16:39:31 +08:00
Xinchen Hui
26dda8999c
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #75961 (Strange references behavior)
2018-02-17 16:33:39 +08:00
Xinchen Hui
94e9d0a2ae
Fixed bug #75961 (Strange references behavior)
2018-02-17 16:33:15 +08:00
Gabriel Caruso
21e3b0c70c
Remove trailing whitespace in inc files
2018-02-10 19:20:23 +01:00
Gabriel Caruso
2d48d734a2
Fix some misspellings
2018-02-06 16:59:00 +01:00
Gabriel Caruso
fef879a2d6
Use bool instead of boolean while throwing a type error
...
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6 , which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6
Use int instead of integer in type errors
...
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
84488d921b
Remove superfluous SKIPIF sections in more tests
2018-02-04 16:57:08 +01:00
Gabriel Caruso
53dbc69a8d
Use %d when expecting line number in tests
2018-02-02 22:35:13 +01:00
Nikita Popov
5c983ae852
Merge branch 'PHP-7.2'
2018-01-12 18:34:34 +01:00
Nikita Popov
8c73fc8027
Fixed bug #75653
2018-01-12 18:30:22 +01:00
Sara Golemon
352b406650
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Don't optimize input arrays with suffix holes
2017-10-27 13:07:50 -04:00
Sara Golemon
cc96166f74
Don't optimize input arrays with suffix holes
2017-10-27 13:07:33 -04:00
Dmitry Stogov
cb9d81ef4f
Refactored recursion pretection
2017-10-06 01:34:50 +03:00
tbpgr
ba83338cbe
Fix typo retuns to returns
2017-08-25 01:30:14 +09:00
Nikita Popov
6c2c7a023d
Optimize array_unique()
...
In SORT_STRING mode, instead of sorting the array, build a hash of
seen elements.
2017-08-01 18:08:38 +02:00
Tom Van Looy
04fb3f28ff
Remove superfluous semicolons
2017-06-26 00:23:25 +02:00
Sara Golemon
81064cd045
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Remove typo from test header
2017-05-10 16:50:47 -07:00
Sara Golemon
90bd4be3f9
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Remove typo from test header
2017-05-10 16:50:37 -07:00
Sara Golemon
b8e0351978
Remove typo from test header
2017-05-10 16:50:19 -07:00
Nikita Popov
51b06aa86e
Merge branch 'PHP-7.1'
2017-04-02 13:20:14 +02:00
Nikita Popov
c8034514ed
Fixed bug #74361
2017-04-02 13:19:32 +02:00
Rowan Collins
1b565f1393
Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
...
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings ]
2017-03-23 18:52:43 +01:00
Sara Golemon
c74bc87c74
Minor optimizations to array_keys()/array_values()
...
array_values():
When the input is an empty array or a packed array with no gaps,
return the original array.
array_keys():
When the input is an empty array, return the original array.
When the input is a packed array with no holes
(and no search key specified), populate the return with
a simple range(0, count($input) - 1)
2017-03-14 11:23:02 -07:00
Nikita Popov
06a0340162
Deprecate each()
2017-02-03 21:02:52 +01:00
Nikita Popov
eaeecc523b
Deprecate create_function()
2017-02-03 18:52:57 +01:00
Nikita Popov
a8d901a80c
Remove zend_version() checks from tests
2017-01-30 22:50:25 +01:00
Nikita Popov
79d918b3a6
Add test for buf #65251
2017-01-08 12:01:18 +01:00
Nikita Popov
5af586bec5
Remove more PHP 6 leftovers from tests
2016-11-24 22:39:39 +01:00
Pedro Magalhães
9c5af4e4cb
Remove the b prefix from literals on unrelated tests
2016-11-20 21:11:53 +01:00
Craig Duncan
c1001d22d2
Add expectations for invalid count() warnings
2016-11-17 09:33:04 +00:00