Nikita Popov
2eb4728611
Remove HAVE_SPL checks
...
SPL is always built.
Also clean up spl_ce_RuntimeException handling in PDO.
2016-01-30 14:53:00 +01:00
Thomas Punt
3bbcd84e2f
re-apply patch for github PR #1695
2016-01-12 07:07:51 +01:00
Anatol Belski
66d10fe085
Revert "patch for github PR #1695 "
...
This reverts commit 58dd956b63
.
crashes on travis
2016-01-11 22:03:36 +01:00
Thomas Punt
58dd956b63
patch for github PR #1695
2016-01-11 21:11:55 +01:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Xinchen Hui
c56efb848b
Fixed bug #71220 (Null pointer deref (segfault) in compact via ob_start)
2015-12-25 21:25:53 -08:00
Xinchen Hui
6313e16a04
Improved fix for bug (count on symbol table)
2015-11-23 06:12:03 -08:00
Xinchen Hui
eada2aa91a
Fixed bug (count on symbol tables)
2015-11-21 20:58:29 -08:00
Xinchen Hui
fce44a5a13
Fixed bug #70910 (extract() breaks variable references)
2015-11-13 19:39:59 -08:00
Reeze Xia
c4297a5a29
This couldn't be false as it has been checked before
2015-10-30 19:50:54 +08:00
Reeze Xia
68b431e37d
Use h parameter to avoid duplicate ht access of array_combine()
2015-10-30 19:49:04 +08:00
Xinchen Hui
179fba3f38
Fixed bug #70808 (array_merge_recursive corrupts memory of unset items)
...
I knew, this fix seems ugly
2015-10-29 14:33:58 +08:00
Dmitry Stogov
3815e97136
Fixed bug #70668 (array_keys() doesn't respect references when $strict is true)
2015-10-08 14:59:02 +03:00
Dmitry Stogov
24e88348f3
Revert "Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src "
...
This reverts commit a6be0f3fd6
.
2015-10-06 23:48:12 +03:00
Bob Weinand
a6be0f3fd6
Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src
2015-10-05 14:50:04 +02:00
Dmitry Stogov
560e4fa393
Removed or simplified incorrect SEPARATE_*() macros usage.
2015-09-29 11:17:43 +03:00
Dmitry Stogov
8fe171a3e0
Don't allocate memory for empty HashTables.
2015-09-17 19:17:10 +03:00
Dmitry Stogov
c174e4cd73
Change array sorting implementation to avoid two level callbacks system.
...
Simplify zval comparion API.
2015-09-10 02:51:23 +03:00
Dmitry Stogov
2ea18cd431
Better array_compare improvement
2015-09-09 15:11:03 +03:00
Xinchen Hui
67d1a47887
Improved array_compare
2015-09-09 17:56:44 +08:00
Dmitry Stogov
1f0f768e3f
Avoid duplication
2015-08-26 14:53:41 +03:00
Anatol Belski
38c19d43c1
fix array size calculation for range, related to bug #70239
2015-08-14 14:34:48 +02:00
Anatol Belski
01ee09f3f7
Fixed bug #70239 Creating a huge array doesn't result in exhausted, but segfault
2015-08-14 14:34:47 +02:00
Xinchen Hui
dc5c6ab774
Fixed bug #70250 (extract() turns array elements to references)
2015-08-13 13:30:25 +08:00
Nikita Popov
4ac0d96faa
Deduplicate usort code
2015-07-18 21:53:03 +02:00
Nikita Popov
df031961ad
Correctly handle zend_hash_sort failure
...
This can't actually happen right now, but should it become possible
we won't be leaking everything anymore.
2015-07-18 20:07:00 +02:00
Nikita Popov
179c8a2a09
Fix usort modification detection
...
This would delref the wrong array, leading to a segfault.
2015-07-18 20:07:00 +02:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1
Improved zend_string API (Francois Laupretre)
...
Squashed commit of the following:
commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
2015-06-29 16:44:54 +03:00
Tjerk Meesters
3bf012a98d
Feature: Enhanced array_column() to also work with object elements.
2015-06-27 07:35:44 +08:00
Rasmus Lerdorf
28d7bb97a1
Fix more proto comments
2015-06-23 17:46:20 -04:00
Dmitry Stogov
b97df475df
Fixed crash in Zend/tests/bug69891.phpt on x86 (32-bit).
...
compare_function() now has to be compatible with binary_op_type (use fastcall convention).
Introduced new zval_compare_function() to be used as zval comparison callback instead of compare_function().
2015-06-22 12:53:52 +03:00
Xinchen Hui
f75308eda1
Micro optimization
2015-06-20 10:52:58 +08:00
Dmitry Stogov
a0b3fd7803
Improved variable name validation
2015-06-17 12:05:58 +03:00
Nikita Popov
fb346c8f93
Support references in convert_to_*
...
conver_to_* functions now accept REFERENCE values, which will be
unwrapped before performing the usual conversion. This is consistent
with convert_scalar_to_number and matches the expected behavior in
a couple random use-sites I checked.
Also includes a couple fixes/cleanups elsewhere and two tests for
cases that previously didn't work (though the reference issue existed
all over the place).
2015-06-16 19:55:33 +02:00
Dmitry Stogov
1c754f0b71
Get rid of more ZVAL_ZVAL() macros
2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921
Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
...
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Nikita Popov
5d3cf577aa
Make convert_to_* safe with rc>1
...
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.
All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).
What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.
Also fixes bug #69788 .
2015-06-11 23:23:57 +02:00
Xinchen Hui
ed8d1ba7dd
Fixed bug #69723 (Passing parameters by reference and array_column)
2015-05-29 13:50:44 +08:00
olshevskiy87
8bdec7a248
fix typos
...
Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
2015-05-13 22:28:35 +04:00
Dmitry Stogov
d880ead8a7
Improve fast_is_[not_]identical() functions to teturn value instead of takeing additional arguments.
...
Pair INSTANCEOF with the following JMPZ/JMPNZ.
2015-04-29 16:43:23 +03:00
Nikita Popov
40e465e357
Clean up some type conversions
...
While at it also fix some type checks in iconv and drop dead and
unported code in standard/filters.
2015-04-27 18:50:08 +02:00
Nikita Popov
94bea670de
Fix bug #69413
2015-04-10 09:49:07 +02:00
Xinchen Hui
f23f7dfed0
Use new macros
2015-04-08 14:30:47 +08:00
Xinchen Hui
b6aeab1b91
Fixed bug #69371 (Hash table collision leads to inaccessible array keys)
2015-04-05 18:45:14 +08:00
Nikita Popov
fa15ac4c37
Fix separation in array_multisort
...
This manifested in Zend/tests/bug52939.phpt when running without
opcache (no immutablization).
2015-04-04 10:52:43 +02:00
Xinchen Hui
af812eac4c
Micro opt
2015-04-01 12:05:19 +08:00
Xinchen Hui
d55d10c7fd
Fixed bug #69299 (Regression in array_filter's $flag argument in PHP 7)
2015-03-25 23:50:54 +08:00
Anatol Belski
774b113b32
fix datatype mismatches
2015-03-25 15:32:36 +01:00