Commit Graph

6362 Commits

Author SHA1 Message Date
Felipe Pena
0a0443f07c - Missing fixes for grammar fix 's/valid path/a valid path/' 2011-06-09 00:23:43 +00:00
Felipe Pena
ddaddf6c2a s/valid path/a valid path/ 2011-06-08 00:53:55 +00:00
Felipe Pena
08b3d76cbf - Fixed bug #55007 (compiler fail after previous fail) 2011-06-07 22:58:38 +00:00
Felipe Pena
66ac89a00b - Added indirect method call through array variable (FR Bug #47160) 2011-06-06 21:42:05 +00:00
Felipe Pena
32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Hannes Magnusson
148120e1e9 Fix tests when running without mbstring 2011-06-05 09:35:49 +00:00
Hannes Magnusson
a1ae8af54c Fix tests
#Note to self; do not rename tests just before committing
2011-06-03 17:38:37 +00:00
Hannes Magnusson
3837f1205b Add tests for broken function arguments 2011-06-03 17:12:59 +00:00
Stanislav Malyshev
e18618905c scalar types cleanup 2011-06-03 01:09:32 +00:00
Dmitry Stogov
c270347c0b MFH: Arithmetic speedup. Inlined most probable code-paths for arithmetic operations directly into executor. 2011-05-31 12:05:25 +00:00
Dmitry Stogov
6fca028fc5 MFH: Fixed bug #54957 (Memleak in alloc_globals_ctor) 2011-05-31 11:38:31 +00:00
Dmitry Stogov
eaeb4537ec MFH: Fixed bug #54910 (Crash when calling call_user_func with unknown function name) 2011-05-31 11:36:57 +00:00
Philip Olson
07e9cfe6a5 Fixed test 2011-05-24 23:49:04 +00:00
Felipe Pena
1101293b3f - Fixed bug #54804 (__halt_compiler and imported namespaces) (Pierrick) 2011-05-19 23:20:47 +00:00
Rasmus Lerdorf
c24ef71e63 Decouple <?= from the short_tags setting and make it always enabled 2011-05-19 16:26:29 +00:00
Scott MacVicar
cfdd25d5c0 ZEND_THREAD_SAFE and ZEND_DEBUG_BUILD are not meant to be case insensitive 2011-05-17 22:24:44 +00:00
Pierre Joye
e6368659a7 - WS 2011-05-17 10:39:18 +00:00
Rasmus Lerdorf
a546b3207f oops, can't use that macro here 2011-05-16 17:26:10 +00:00
Rasmus Lerdorf
a5eeecb13f Suppress a dozen unused return value warnings in places where the return
value is really not useful to us.
2011-05-16 17:22:41 +00:00
Rasmus Lerdorf
353077d234 Get rid of autoconf warnings 2011-05-16 00:14:47 +00:00
Stanislav Malyshev
516c2f5920 removing scalar types in trunk 2011-05-15 00:36:13 +00:00
Stefan Marr
8ba00176f1 Fixed a inconsitent condition for aliasing traits.
- missed a failing Traits test, but is now fixed, and the bug covered by a dedicated test
# Should always comment conditions that go over more than two lines :-/
2011-05-13 20:28:34 +00:00
Dmitry Stogov
6eedfb9b3a Fixed direct threaded executor (php zend_vm_gen.php --with-vm-kind=GOTO) 2011-05-05 16:02:11 +00:00
Dmitry Stogov
9fb4cd1a91 Fixed bug #54585 (track_errors causes segfault) 2011-04-25 07:50:07 +00:00
Dmitry Stogov
821d7169d9 Fixed bug #54367 (Use of closure causes problem in ArrayAccess). 2011-04-20 12:59:18 +00:00
Felipe Pena
b57d9f41cf - Fixed ZTS build 2011-04-17 22:06:27 +00:00
Dmitry Stogov
50ce16deff Fixed bug #54268 (Double free when destroy_zend_class fails) 2011-04-15 12:43:20 +00:00
Dmitry Stogov
8fe3ea75cb Changed initialization order to workaround against crashes after memory overflow 2011-04-15 09:59:42 +00:00
Dmitry Stogov
e623543452 Improved GC to avaid reconstruction of HashTables for object properties 2011-04-15 09:57:43 +00:00
Sebastian Bergmann
6f3148db81 Add optional argument to debug_backtrace() and debug_print_backtrace() to limit the amount of stack frames returned. 2011-04-09 09:52:24 +00:00
Dmitry Stogov
efcb9a71cd - Fixed bug #54358 (Closure, use and reference)
- Fixed bug #54039 (use() of static variables in lambda functions can break staticness)
2011-04-08 10:02:07 +00:00
Dmitry Stogov
d3274b7f20 Missed tests 2011-04-07 14:34:07 +00:00
Dmitry Stogov
2e25ec9eb7 Fixed bug #54372 (Crash accessing global object itself returned from its __get() handle) 2011-04-07 13:35:27 +00:00
Felipe Pena
9e05a9ad13 - Removed unused variable (Pierrick) 2011-04-03 17:20:34 +00:00
Pierre Joye
6aed81764e - fix bug #54423, fix build in trunk, introduce by previous related commit 2011-03-31 23:58:06 +00:00
Antony Dovgal
6e7a3015e5 fix bug #54423 (classes from dl()'ed extensions are not destroyed) 2011-03-31 11:59:34 +00:00
Dmitry Stogov
b60e4fe4f0 Fixed bug #54265 (crash when variable gets reassigned in error handler) 2011-03-16 15:21:38 +00:00
Dmitry Stogov
8c06867e11 Fixed bug #54262 (Crash when assigning value to a dimension in a non-array) 2011-03-16 11:14:33 +00:00
Stanislav Malyshev
a5b9eda06a fix UMR when setting forward string offset 2011-03-16 05:41:50 +00:00
Stanislav Malyshev
8efa208e0b fix UMR when variable name is an object and __toString is used
# zend_call_function checks IS_REF on This
2011-03-16 05:25:02 +00:00
Dmitry Stogov
4c7c9df815 Fixed multibyte related issues 2011-03-14 16:02:04 +00:00
Dmitry Stogov
bbc879b587 Fixed multibyte related issues 2011-03-14 16:00:59 +00:00
Sebastian Bergmann
2a94e04aeb Fix prototype of zend_fetch_debug_backtrace(). 2011-03-11 03:52:39 +00:00
Moriyoshi Koizumi
cdb9ee0d1a Fix zend.multibyte oddities. Hope this will address all the known problems. 2011-03-06 07:00:30 +00:00
Felipe Pena
3510be42b7 - Fixed bug #43512 (same parameter name can be used multiple times in method/function definition) 2011-02-17 23:24:50 +00:00
Dmitry Stogov
64351b7add Fixed Bug #53958 (Closures can't 'use' shared variables by value and by reference) 2011-02-14 10:52:16 +00:00
Dmitry Stogov
b84967d3e2 Fixed Bug #53971 (isset() and empty() produce apparently spurious runtime error) 2011-02-14 08:46:53 +00:00
Pierre Joye
a0a603d16b - null deref fix 2011-02-07 10:25:34 +00:00
Felipe Pena
f6a3cd6f57 - Fixed bug #53748 (Using traits lead to a segmentation fault) 2011-01-28 21:19:09 +00:00
Pierre Joye
9885f30873 - fix warning about undefined zend_multibyte_set_filter and zend_multibyte_yyinput_again, why are they not in zend_multibyte.h btw? 2011-01-19 21:40:15 +00:00
Pierre Joye
a27baa7161 - WS 2011-01-19 17:17:52 +00:00
Pierre Joye
3584bbee3b - avoid local redeclaration 2011-01-19 17:06:50 +00:00
Stanislav Malyshev
0c1ba13d3b Fix bug #47143, bug #51458 - provide more useful info in bad exception cases 2011-01-16 21:24:43 +00:00
Stanislav Malyshev
b4dba12d34 Add options to debug_backtrace functions 2011-01-16 20:39:22 +00:00
Felipe Pena
c6544fad1a - Fixed bug #53717 (checking the number of arguments is wrong in zend_parse_method_parameters_ex())
patch by: klaus at triendl dot eu
2011-01-12 22:17:10 +00:00
Stefan Marr
478e5d1dd0 Added trait_exists() [TRAITS] [DOC]
- also changed class_exists() to return false for traits
- added related tests, and get_declared_traits() tests in ext/s/t/co
2011-01-09 19:57:41 +00:00
Rasmus Lerdorf
dc444e8a37 Fix bug #53682 2011-01-06 22:48:20 +00:00
Scott MacVicar
8634d8ca2b Add test for bug #53632 2011-01-04 23:36:56 +00:00
Scott MacVicar
bb08994d71 Fix bug #53632 with x87 fpu 2011-01-04 22:36:23 +00:00
Felipe Pena
8d8f6552ca - Fixed tests 2011-01-04 22:01:09 +00:00
Ilia Alshanetsky
7a2157cf37 Fixed Bug #53629 (memory leak inside highlight_string()). 2011-01-03 14:39:48 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Scott MacVicar
6144da7e35 Silently casting an empty string, null or false into an object by adding a property
is pretty non-intuitive. If the same value was 1 or true you get a warning and it halts.

Since we can't break BC completely (yet) lets bump this from E_STRICT.

Also added a new section to UPGRADING for engine changes.

<?php
$x = '';
// $x = null;
// $x = false;
$x->baz = 1;
var_dump($x);

$y = 1;
$y->baz = 1;
var_dump($y);
2010-12-31 16:57:45 +00:00
Antony Dovgal
ae0e5a0c8c initialize script_encoding_list (reported by Gustavo Lopes) 2010-12-27 20:25:34 +00:00
Felipe Pena
d88a9a3f80 - Fixed INI test section 2010-12-25 01:42:45 +00:00
Moriyoshi Koizumi
e540cb0c45 - Fix startup warnings. 2010-12-24 08:42:21 +00:00
Felipe Pena
7c9fb17d00 - Fix build 2010-12-20 12:41:35 +00:00
Stefan Marr
d6ac811e5d Removed dead code.
# should not have been commited in the first place.
2010-12-20 08:49:59 +00:00
Moriyoshi Koizumi
a304a0fc04 - Avoid allocating extra buffers. This makes parsing with zend.multibyte enabled as fast as with it disabled. 2010-12-20 03:16:09 +00:00
Moriyoshi Koizumi
b09bb21292 - Fix a bug that the script gets wrongly converted into UTF-8 when the script encoding is not GL-safe. 2010-12-20 03:11:41 +00:00
Felipe Pena
3e3d7c52f0 - Fix build 2010-12-20 01:42:25 +00:00
Stefan Marr
7357867bac Added strict handling of properties in traits.
# This is the first attempt to implement the properties as discussed on the mailinglist.
# RFC is not updated to reflect this changes, yet.
2010-12-20 00:52:40 +00:00
Stefan Marr
d88515e1b8 Fixed naming of parameters, was inconsistent with implementation. 2010-12-19 22:13:41 +00:00
Moriyoshi Koizumi
a57e59ed6c WS 2010-12-19 17:29:21 +00:00
Moriyoshi Koizumi
bbf3d43c1e * Refactor zend_multibyte facility.
Now mbstring.script_encoding is superseded by zend.script_encoding.
2010-12-19 16:36:37 +00:00
Stefan Marr
d7c3c627e8 Changed E_ERROR to E_COMPILE_ERROR for Trait compilation errors.
#Thanks for catching this Kalle.
2010-12-12 17:12:29 +00:00
Stefan Marr
1d2a63da5f Changed collision warning for Traits to fatal error.
#This change is made to have all possible cases of collisions consistently handled as fatal errors.
#The reason to have it fatal is that most likely something changed unexpectedly and needs urgent attention by the developer, since it will fail eventually anyway for instance because the expected method is missing in the class.
#Discussed in this thread: http://marc.info/?l=php-internals&m=129155790226876
2010-12-12 16:48:02 +00:00
Dmitry Stogov
c35fc78890 Fixed bug #53511 (Exceptions are lost in case an exception is thrown in catch operator) 2010-12-09 16:38:37 +00:00
Dmitry Stogov
5f8ff99a05 Fixed startup errors if ext/exif is loaded without ext/mbstring 2010-12-08 14:49:26 +00:00
Dmitry Stogov
755c2cd0d8 Removed compile time dependency from ext/mbstring 2010-12-08 11:27:34 +00:00
Pierre Joye
e72e27eecc - fix ts build 2010-12-01 16:48:53 +00:00
Stefan Marr
d0c144d732 Removed old commented function prototypes.
# Was referring to old trait-related code that is long gone
2010-12-01 15:20:11 +00:00
Dmitry Stogov
a45631d966 Allowed indirect $this access (Scott) 2010-12-01 13:33:49 +00:00
David Soria Parra
76a8811c5d C comments instead of C++ comments 2010-11-30 12:51:57 +00:00
Pierre Joye
4574844c52 - cleanup broken double definition of php_win_err and rename it while being there 2010-11-25 23:06:12 +00:00
Felipe Pena
965c30dc2e - Removed unused variable 2010-11-24 20:50:07 +00:00
Dmitry Stogov
7628da98c4 Removed support for break/continue $var syntax 2010-11-24 12:19:56 +00:00
Dmitry Stogov
bf05cc7490 Fixed test 2010-11-24 10:54:35 +00:00
Dmitry Stogov
ac71f49344 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini (regenerated scanner) 2010-11-24 05:42:52 +00:00
Dmitry Stogov
ab93d8c621 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini 2010-11-24 05:41:23 +00:00
Felipe Pena
7c541356f3 - Fixed compile warnings 2010-11-23 21:49:18 +00:00
Felipe Pena
201ab8bb8c - Fixed test 2010-11-23 21:45:22 +00:00
Dmitry Stogov
d72ac0771d Fixed bug #35547 (Segfault accessing static method) 2010-11-23 10:22:34 +00:00
Stefan Marr
4cc45507da Fixed problem reported by Patrick ALLAERT. Trait method was not applied properly when fully qualified. 2010-11-18 17:59:04 +00:00
Stefan Marr
6ad5c889a1 Added tests to for static support of traits.
# This was not tested and documented yet.
# Updated documentation in the RFC http://wiki.php.net/rfc/horizontalreuse
2010-11-17 23:05:20 +00:00
Felipe Pena
45189fa803 - Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" probe fires)
patch by: mike at harschsystems dot com
2010-11-17 21:41:30 +00:00
Pierre Joye
d6723d57c0 - test for NULL deref fix 2010-11-17 17:26:33 +00:00
Pierre Joye
1d04f413cf - NULL deref fix, patch by Gustavo 2010-11-17 16:46:19 +00:00
Felipe Pena
565c484222 - Moved leak_variable() to zend_builtin_functions.c (Gustavo) 2010-11-15 17:06:27 +00:00
Felipe Pena
5f31c44509 - Add missing check 2010-11-14 01:38:52 +00:00
Felipe Pena
c95e919e3e - Fix the constant detection 2010-11-13 19:50:55 +00:00
Felipe Pena
b5b0599398 - Fixed bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__)
- Fixed a part of bug #53260 (the __COMPILER_HALT_OFFSET__ name is not shown in the E_NOTICE)
2010-11-13 18:46:11 +00:00
Etienne Kneuss
105db96e78 Fixed covariance of return-by-ref constraints 2010-11-03 15:40:24 +00:00
Felipe Pena
e3ced0b540 - Reverted fix for bug #51176 2010-11-03 01:35:26 +00:00
Dmitry Stogov
68e154b1bf reduced size of temp_variariable 2010-10-22 14:51:07 +00:00
Dmitry Stogov
968bdc576c Simplified foreach() handling, we don't have to inctrement/decrement refcount twice 2010-10-22 13:59:23 +00:00
Dmitry Stogov
d12098eeec Fixed crash on attempt to insert reference to string offset into an array 2010-10-22 11:05:22 +00:00
Dmitry Stogov
635f3aff75 Removed redundant check 2010-10-22 09:56:39 +00:00
Derick Rethans
0e24a7c400 - Strip out the typehint *checks* only. They are still parsed, and they are
still accessible through the reflection API.
2010-10-19 10:42:38 +00:00
Dmitry Stogov
3690ce39d9 zend_collect_module_handlers() has to be called after zend_extensions startup, because they can register additional 'hidden' extensions 2010-10-15 07:30:24 +00:00
Hartmut Holzgraefe
aaa2f1c30b marked char pointer arguments as const in lots of
places where strings pointed to are not modified 
to prevent compiler warnings about discarded qualifiers ...
2010-10-14 21:33:10 +00:00
Dmitry Stogov
f4173a8ece Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF) 2010-10-13 08:51:39 +00:00
Dmitry Stogov
bfe51842ab Added test 2010-10-12 07:38:36 +00:00
Felipe Pena
dbb6e0e9b0 - Added bison 2.4.3 version to the bison version list 2010-10-07 21:44:41 +00:00
Dmitry Stogov
fa3f0bb63f Fixed bug #51008 (Zend/tests/bug45877.phpt fails) 2010-10-05 11:28:56 +00:00
Dmitry Stogov
656f1fb271 Bug #51155 (Unreasonable non-emalloc allocations of memory) 2010-10-04 15:50:47 +00:00
Dmitry Stogov
e8c87c6d21 - Fixed bug #52773 (Proxy objects have an inadequate destroy_object store callback)
- Fixed bug #52774 (Proxy object's store free callback calls zval_ptor_dtor on already freed data)
2010-10-04 07:15:30 +00:00
Dmitry Stogov
d3b6fbe39b Fixed bug #52940 (call_user_func_array still allows call-time pass-by-reference). (cataphract@php.net) 2010-10-01 11:53:04 +00:00
Dmitry Stogov
f64e4bac49 Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry) 2010-10-01 09:49:20 +00:00
Dmitry Stogov
53d3320951 Prevented crash in GC because of incorrect reference counting 2010-09-30 14:11:51 +00:00
Felipe Pena
ee4f5ac1c0 - Fixed EG(saved_fpu_cw) initialization 2010-09-22 00:11:34 +00:00
Dmitry Stogov
c2a92f3d27 Fixed bug #52888 (Zend MM shutdown crash) 2010-09-20 12:12:42 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Pierre Joye
4420a91bbd - macros--; ZEND_FAST_* are now gone 2010-09-15 17:27:43 +00:00
Pierre Joye
ef53214b1c - not used anymore 2010-09-15 16:58:11 +00:00
Dmitry Stogov
e3bb93480a Regenerated 2010-09-15 07:39:57 +00:00
Dmitry Stogov
f2df6a4a3e - Improved memory usage
. zend_function.pass_rest_by_reference is replaced by
    ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags
  . zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE
    in zend_function.fn_flags
  . zend_arg_info.required_num_args removed. it was needed only for internal
    functions. Now the first arg_info for internal function (which has special
    meaning) is represented by zend_internal_function_info structure.
  . zend_op_array.size, size_var, size_literal, current_brk_cont,
    backpatch_count moved into CG(context), because they are used only during
    compilation.
  . zend_op_array.start_op is moved into EG(start_op), because it's used
    only for 'interactive' execution of single top-level op-array.
  . zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in
    zend_op_array.fn_flags.
  . op_array.vars array is trimmed (reallocated) during pass_two.
  . zend_class_entry.constants_updated is replaced by
     ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags
  . the size of zend_class_entry is reduced by sharing the same memory space
    by different information for internal and user classes.
    See zend_class_inttry.info union.
2010-09-15 07:38:52 +00:00
Johannes Schlüter
1e1e70dc55 - Don't be silent on bailout 2010-09-14 14:26:37 +00:00
Dmitry Stogov
411f9fbe4d We don't need to preallocate a memory segment in case we don't use zend memory manager 2010-09-08 07:52:49 +00:00
Dmitry Stogov
88bf6d2e16 Fixed GC bug 2010-09-03 09:27:47 +00:00
Dmitry Stogov
caffc1c972 Preallocate zend_hash instead of allocation/deallocation it on each request 2010-08-27 06:09:18 +00:00
Dmitry Stogov
2188f26c45 Fixed bug #52614 (Memory leak when writing on uninitialized variable returned from method call) 2010-08-25 09:14:36 +00:00
Scott MacVicar
1e48c71b96 Fix a bug where two doubles are equal but the maths operation makes it appear false.
Best example with INF where equals and identical produce different results.

<?php
var_dump(INF==INF);
var_dump(INF===INF);
2010-08-22 08:01:34 +00:00
Felipe Pena
37c39519bc - Reverted unintended modification 2010-08-18 22:08:36 +00:00
Dmitry Stogov
8a6d73b084 improved performance of @ (silence) operator 2010-08-18 13:58:13 +00:00
Dmitry Stogov
42289228ff Revert unintended modification 2010-08-18 09:45:52 +00:00
Felipe Pena
f3028b9226 - Improved fix for bug #52573 2010-08-18 01:59:37 +00:00
Sascha Schumann
0cbc4a08a1 align declaration with definition
(patch by kalle)
2010-08-17 12:14:52 +00:00
Dmitry Stogov
d93cf2a2d0 Bug #52361 (Throwing an exception in a destructor causes invalid catching) 2010-08-16 09:20:46 +00:00
Dmitry Stogov
e461c22ea9 Fixed memory leaks (related to bug #52361) 2010-08-16 08:11:08 +00:00
Felipe Pena
fdb6077fda - Missing traits data initialization for internal classes (causing Reflection to crash) 2010-08-14 01:12:43 +00:00
Dmitry Stogov
f48999ca3b Optimization of ASSIGN instruction 2010-08-11 15:34:06 +00:00
Dmitry Stogov
931c2d104d In ZTS mode default properties and constants of internal classes can't be modified in place and have to be separated 2010-08-11 09:38:41 +00:00
Dmitry Stogov
7566ff38a1 Fixed support for static properties of internal classes 2010-08-11 08:34:54 +00:00
Dmitry Stogov
e0b728597b Optimization (IS_TMP_VARs don't need reference counting) 2010-08-10 15:24:19 +00:00
Dmitry Stogov
523b965cd4 Prevent generation of long strings 2010-08-10 14:44:50 +00:00
Dmitry Stogov
808fd3f1f7 Optimization 2010-08-10 14:43:17 +00:00
Felipe Pena
30470999fe - Back the free() call for __iterator_wrapper to free the ce->name, as it is a fake class 2010-08-08 22:43:14 +00:00
Felipe Pena
c6c97db78f - Fix warning because the comparsion with literal (e.g. INIT_CLASS_ENTRY(..., "Foo", ...)) 2010-08-08 20:07:23 +00:00
Felipe Pena
e10d33fe5a - Fixed bug #52539 (Calling function from rebound Closure causes crash) 2010-08-08 15:06:14 +00:00