Commit Graph

394 Commits

Author SHA1 Message Date
Nikita Popov
37aaccad7d Use inline functions for most of smart_str
smart_str_free_ex no longer exists, always use smart_str_free instead.

smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Nikita Popov
079409bbc2 Switch (un)mangle property name to size_t and zend_string
Also use the _ex variants where possible.
2014-09-16 00:31:27 +02:00
Anatol Belski
e591c78d09 revamp serialization to work with size_t for Serializable 2014-09-15 19:46:28 +02:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
dc40a5c450 refix the dump stuff again 2014-08-18 20:57:00 +02:00
Anatol Belski
b8324e6d63 further fixes to ext/standard 2014-08-18 16:50:54 +02:00
Anatol Belski
a3b0cafc01 more fixes to var_dump and co. 2014-08-17 22:34:18 +02:00
Anatol Belski
5bb25776a0 further fixes on core 2014-08-16 15:34:04 +02:00
Anatol Belski
b7e7a89541 several fixes -
- param parsing Z_PARAM_STR vs Z_PARAM_STRING
- some functions for new params
- etc
2014-08-16 12:55:13 +02:00
Anatol Belski
cb25136f4e fix macros in the 5 basic extensions 2014-08-16 11:37:14 +02:00
Dmitry Stogov
dd1c68e67f Merge branch 'master' into phpng
* master: (77 commits)
  NEWS entry for Fix potential segfault in dns_get_record()
  NEWS entry for "Fix potential segfault in dns_get_record()"
  NEWS entry for Fix potential segfault in dns_get_record(
  Fix potential segfault in dns_get_record()
  Revert "Add optional second arg to unserialize()"
  5.5.15 now
  update NEWS
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.31 next
  Add NEWS. This doesn't need UPGRADING (or an RFC), IMO.
  Fix broken test.
  Add a mime type map generation script and update the header.
  Move the mime type map out of php_cli_server.c for easier generation.
  Replace the CLI server's linear search for extensions with a hash table.
  fix test
  Remove unused included file
  NEWS
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
  ...

Conflicts:
	Zend/zend_closures.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/spl/spl_array.c
	ext/standard/basic_functions.c
	ext/standard/dns.c
	ext/standard/var.c
2014-06-12 05:07:33 +04:00
Ferenc Kovacs
c38ab260fe Revert "Add optional second arg to unserialize()"
This reverts commit cfd1045822.
2014-06-11 14:43:09 +02:00
Dmitry Stogov
c1965f58d4 Use reference counting instead of zval duplication 2014-06-05 16:04:11 +04:00
Dmitry Stogov
b3b616cf7e Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM. 2014-05-29 18:21:56 +04:00
Dmitry Stogov
6c4b30eb07 Use new zend_hash API 2014-05-28 02:13:45 +04:00
Xinchen Hui
922285ec55 Don't use cast (compiler friendly) 2014-05-26 11:05:04 +08:00
Xinchen Hui
b0ecac6ba8 Fixed uninitialized used 2014-05-18 20:55:06 +08:00
Pierre Joye
6e84e4a28e unused local var 2014-05-15 10:12:02 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov
7652a977a8 Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family. 2014-04-18 19:18:11 +04:00
Dmitry Stogov
f9b26bc39a Cleanup (2-nd round) 2014-04-15 21:56:30 +04:00
Dmitry Stogov
aa2ed70d43 Fixed srialize() 2014-04-11 13:44:23 +04:00
Dmitry Stogov
c54768bd60 fixed serialize() 2014-04-10 22:44:39 +04:00
Dmitry Stogov
ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Dmitry Stogov
887189ca31 Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing 2014-03-26 18:07:31 +04:00
Dmitry Stogov
62c448ab8b Fixed serialize/unserialize problems 2014-03-17 17:23:27 +04:00
Xinchen Hui
661df93ea8 IS_REFERENCE is unfrequent 2014-03-09 20:03:24 +08:00
Dmitry Stogov
2eb980f614 IS_REFERENCE with refcount==1 should be handled as ordinal value 2014-03-06 12:37:46 +04:00
Dmitry Stogov
dd7c7e6fb2 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Conflicts:
	ext/standard/formatted_print.c
2014-03-05 11:26:35 +04:00
Dmitry Stogov
040dea8b82 Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore. 2014-03-05 11:10:52 +04:00
Xinchen Hui
37343cc17d Fixed var_export reference handling 2014-03-05 12:10:43 +08:00
Xinchen Hui
c146752812 Fixed reference handling in zif_unserialize 2014-02-26 11:21:52 +08:00
Xinchen Hui
7f527d8047 Fixed reference handling in serialize/unserialize 2014-02-26 11:08:13 +08:00
Xinchen Hui
dc2d758c93 Fixed segfaults 2014-02-25 16:54:26 +08:00
Xinchen Hui
b287591a87 Refactor php_str_to_str returning zend_string 2014-02-23 19:25:26 +08:00
Xinchen Hui
0e4cfad1e8 Refactor php_addcslashes using zend_string 2014-02-22 20:51:26 +08:00
Dmitry Stogov
6454684212 Use better data structures (incomplete) 2014-02-21 22:59:51 +04:00
Dmitry Stogov
52bd62eca8 Fixed assertions 2014-02-21 20:35:40 +04:00
Xinchen Hui
43b03c74b3 Refacting smart_str 2014-02-18 17:42:46 +08:00
Dmitry Stogov
2b9b9afa7a Use better data structures (incomplete) 2014-02-17 17:59:18 +04:00
Dmitry Stogov
398256e5fe Use better data structures (incomplete) 2014-02-14 13:40:11 +04:00
Dmitry Stogov
40e053e7f3 Use better data structures (incomplete) 2014-02-13 17:54:23 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Yasuo Ohgaki
3cf2682083 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
2013-10-29 17:30:58 +09:00
Yasuo Ohgaki
d04bcb8969 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
2013-10-29 17:28:35 +09:00
Yasuo Ohgaki
4dc4302a30 Fixed Bug 64760 var_export() does not use full precision for floating-point numbers 2013-10-29 17:24:23 +09:00
Nikita Popov
9b46a15a6e Remove extraneous NULL check of Z_ARRVAL_P()
Z_ARRVAL_P() is never NULL
2013-10-19 23:52:23 +02:00
Michael Wallner
f72ed22749 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
2013-10-04 16:17:46 +02:00
Michael Wallner
d72a4d1634 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
2013-10-04 16:17:37 +02:00
Michael Wallner
8973390541 fix bug #64146 (serialize incorrectly saving objects when they are
cloned)
2013-10-04 16:16:15 +02:00
Stanislav Malyshev
02457554a3 Merge branch 'PHP-5.5'
* PHP-5.5:
  backward compatibility
  HASH_KEY_NON_EXISTANT fix
2013-07-21 20:10:31 -07:00
Veres Lajos
4749457a49 HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
Sara Golemon
cfd1045822 Add optional second arg to unserialize()
Returns the number of bytes consumed by reference for
streaming unserialization.

Actual unserialization behavior is not modified at all.

The need for this came up while trying to parse SplDoublyLinkedList's
serialization format which uses a non-standard stream of serialized values.
2013-05-16 15:18:35 -07:00
Xinchen Hui
f52b2e6a65 Fixed bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
about the __sleep one, since php_serialize_* are all void function,
so,,only check exception at the very begining
2013-03-09 23:00:58 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
60a280936e Merge branch 'PHP-5.3' into PHP-5.4 2012-10-02 00:30:49 +08:00
Xinchen Hui
4f860a4412 Avoding superfluous function call 2012-10-02 00:28:38 +08:00
Lonny Kapelushnik
45f3322905 var_export outputs an E_WARNING when recursion is detected 2012-08-05 20:56:06 -07:00
Moriyoshi Koizumi
91e1df704e Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:14:19 +09:00
Moriyoshi Koizumi
e427182279 Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:13:23 +09:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Michael Wallner
b6921369b5 Fix Bug #55801 Behavior of unserialize has changed:
(un)serialize in __wakeup/__sleep now use clean var_hashes
2011-10-19 10:09:24 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Xinchen Hui
9fb62f3382 Sync r314808 to 5_3 branch
Eliminated compiler warnings "comparison is always false",  "cast to pointer from integer of different siz" and tail zero warnings
2011-08-23 10:18:48 +00:00
Xinchen Hui
ba9546b8e5 Omitted GCC warning "comparison is always false" 2011-08-12 07:47:03 +00:00
Pierrick Charron
029d7f4c6c class entry is never used 2011-08-07 06:04:11 +00:00
Pierrick Charron
a8ed880c64 class entry is never used 2011-08-07 06:04:11 +00:00
Gustavo André dos Santos Lopes
404686447b - Fixed bug #55082 (var_export() doesn't escape properties properly). 2011-06-30 09:26:35 +00:00
Gustavo André dos Santos Lopes
3dafd9549d - Fixed bug #55082 (var_export() doesn't escape properties properly). 2011-06-30 09:26:35 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Kalle Sommer Nielsen
1fed0e5a84 Kill some more constness warnings in com_dotnet/phar/standard 2010-11-19 16:03:00 +00:00
Kalle Sommer Nielsen
06a9baf4d9 Missed to check this one in the last commit 2010-09-23 03:49:26 +00:00
Pierre Joye
2b1e18f81b - fix build introduced by fix for #52772 2010-09-13 21:54:47 +00:00
Kalle Sommer Nielsen
4119b09a1a Fixed bug #52772 (var_dump() doesn't check for the existence of get_class_name before calling it) 2010-09-13 20:14:18 +00:00
Kalle Sommer Nielsen
67b4af3e6a Fixed bug #52772 (var_dump() doesn't check for the existence of get_class_name before calling it) 2010-09-13 20:14:18 +00:00
Felipe Pena
1e17bb2aab - Fixed bug #52534 (var_export array with negative key) 2010-08-04 23:11:44 +00:00
Felipe Pena
3d2a6927c7 - Fixed bug #52534 (var_export array with negative key) 2010-08-04 23:11:44 +00:00
Scott MacVicar
c02f6724a8 Doing this as a seperate commit unless we need to back it out.
Fix a bug when var_export() causes a fatal error that could inadvertently display data due to flushing of the output buffer.

Examples include, memory limit, execution time and recursion.
2010-07-09 21:19:27 +00:00
Scott MacVicar
c7b0abe6aa Fix a bug when var_export() causes a fatal error that could inadvertently display data due to flushing of the output buffer.
Examples include, memory limit, execution time and recursion.
2010-07-09 21:11:37 +00:00
Pierre Joye
badf05a8ea - silent warning (unary minus operator applied to unsigned type) 2010-06-06 15:28:30 +00:00
Pierre Joye
9ef717c0c2 - silent warning (unary minus operator applied to unsigned type) 2010-06-06 15:28:30 +00:00
Michael Wallner
11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00
Michael Wallner
89e93723fb Added support for object references in recursive serialize() calls. FR #36424 2010-05-26 07:24:37 +00:00
Felipe Pena
fa76263481 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection) 2010-04-02 21:44:09 +00:00
Felipe Pena
a140e70661 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection) 2010-04-02 21:44:09 +00:00
Jani Taskinen
af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen
06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Stanislav Malyshev
20ee379007 fix interrupt problem in serialize() 2009-11-29 04:38:46 +00:00