Commit Graph

376 Commits

Author SHA1 Message Date
Xinchen Hui
ad553a7af2 Fixed bug #63726 (Memleak with static properties and internal/user classes) 2012-12-10 20:28:27 +08:00
Dmitry Stogov
6ba376f552 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)

Conflicts:
	NEWS
	Zend/zend_object_handlers.c
2012-09-06 12:14:29 +04:00
Dmitry Stogov
b29dc146b9 - Fixed bug #61767 (Shutdown functions not called in certain error situation)
- Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
2012-09-06 11:26:40 +04:00
Stanislav Malyshev
a0dff6fdca fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-13 14:40:44 -07: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
Xinchen Hui
2f62602c03 Fixed bug #60558 (Invalid read and writes)
Re-Fixed bug #60536 (Traits Segfault)
#Thanks to tony2001, I found the previous fix -r321089 is actually not a correct one.
#The key problem there is because the traits didn't correct set the property_info.offset
#for private properties. so here come the new fix.
2011-12-19 16:48:18 +00:00
Xinchen Hui
7fcba87e68 Revert previous bad fix, introduce memory leak 2011-12-19 12:00:09 +00:00
Xinchen Hui
d589d33468 Fixed bug #60558 (Invalid read and writes) 2011-12-19 09:58:29 +00:00
Xinchen Hui
db63456a8d Reduce memory usage 2011-12-17 03:57:01 +00:00
Xinchen Hui
01dc47631e Fixed bug #60536 (Traits Segfault)
# this is a tough one, I think I should explain
# Zend use zend_object->properties_table both as zval ** and zval ***
# if a zend_object->properties is not initialized, the properties_table is zval **
# while in rebuild_object_properties, zend will store the zval ** to zend_object->properties
# then stash the zval ***(ie, zobj->properties_table[0] is zval ** now) to  zobj->properties_table[0] 
# so when a zend_object inherit form multi parent and these parent have a same property_info->offset 
# properties, will result in a repeat zval **->zval ** transform, which will lead to a segmentfault
# *may be* this fix is not the best fix, we should not use this tricky way, and rewrite this mechanism.
2011-12-16 19:02:52 +00:00
Dmitry Stogov
e0f781f496 Fixed bug #60139 (Anonymous functions create cycles not detected by the GC) 2011-11-02 06:31:33 +00:00
Etienne Kneuss
c2a92317f4 Fix folding 2011-09-15 14:50:38 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
03b6daed4f Fixed bug #54372 (Crash accessing global object itself returned from its __get() handle) 2011-04-07 13:35:27 +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
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Felipe Pena
e3ced0b540 - Reverted fix for bug #51176 2010-11-03 01:35:26 +00:00
Felipe Pena
815d0e549b - Reverted fix for bug #51176 2010-11-03 01:35:26 +00:00
Dmitry Stogov
4d8503a212 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
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
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
Felipe Pena
c0e6f37cb9 - Fixed bug #52484 (__set() ignores setting properties with empty names) 2010-08-01 13:27:02 +00:00
Felipe Pena
e914d90643 - Fixed bug #52484 (__set() ignores setting properties with empty names) 2010-08-01 13:27:02 +00:00
Felipe Pena
f1e02c5cc7 - Fixed bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+) 2010-06-12 15:30:21 +00:00
Felipe Pena
2c2fcc2217 - Fixed bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+) 2010-06-12 15:30:21 +00:00
Dmitry Stogov
c5237d82bf Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties 2010-05-24 14:11:39 +00:00
Dmitry Stogov
277f271a83 Added compiler hints 2010-05-06 12:52:27 +00:00
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Felipe Pena
79f618833f - Fixed bug #51176 (Static calling in non-static method behaves like $this->) 2010-03-02 00:16:40 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Scott MacVicar
d976be4bda Make the check case sensitive, and since we can only have a constructor that matches the class name or is __construct
its probably safe to just check for __. This means we can skip lowering the function_name, which is hard to be binary
safe sine we don't store the length.

If we just did a zend_hash_exists lookup we'd be fine since its stored lowercased already :)
2009-06-19 03:29:47 +00:00
Scott MacVicar
8e3aebd550 Fix bug #48215 - Calling a method with the same name as the parent class calls the constructor instead. 2009-06-18 13:46:16 +00:00
Felipe Pena
2cb9fe1f89 - Constified method_name arg. in zend_get_user_call_function() and zend_get_user_callstatic_function() 2009-06-12 21:36:53 +00:00
Felipe Pena
5f8ca6da95 MFH: Fixed bug #48533 (__callStatic is not invoked for private/protected methods) 2009-06-12 01:05:25 +00:00
Felipe Pena
db1eafa8d0 - MFH: Fixed bug #48248 (SIGSEGV when access to private property via &__get) 2009-05-12 22:55:05 +00:00
Dmitry Stogov
312176f083 Reverted "Rebind closure when binding to property" 2009-01-14 10:28:22 +00:00
Andrei Zmievski
26bb96e218 Changed __call() to be invoked on private/protected method access,
similar to properties and __get().
2009-01-07 22:12:39 +00:00
Marcus Boerger
0e131653c1 - MFH Rebind closure when binding to property 2009-01-03 17:48:40 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Dmitry Stogov
7d4fd3fd38 Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:01:23 +00:00
Dmitry Stogov
41ad9b4d1f Fixed bug #46308 (Invalid write when changing property from inside getter) 2008-10-17 10:26:07 +00:00
Etienne Kneuss
f90255c66b MFH: Handlerify get_closure 2008-08-14 21:36:56 +00:00
Felipe Pena
cf7384aa40 - MFH: Constness (Added const qualifier to several function parameters) 2008-08-12 17:20:25 +00:00
Dmitry Stogov
af05ce0af6 Fixed is_callable/call_user_func mess that had done different things for very similar arguments e.g. array("A","B") and "A::B" 2008-07-26 13:14:04 +00:00
Felipe Pena
cc23d3bade - Fixed bug #45089 (__callStatic $name case sensitivity) 2008-06-03 18:11:12 +00:00
Matt Wilmas
7da75d81e7 MFH: Add array_init_size() and use it where array size is known at initialization 2008-05-27 10:29:33 +00:00
Felipe Pena
a578b0cbcc - MFH: Fixed bug #44899 (__isset usage changes behavior of empty()) (patch by Etienne Kneuss) 2008-05-03 00:38:55 +00:00
Dmitry Stogov
2ecf4bb0a7 Lazy EG(active_symbol_table) initialization 2008-04-29 08:15:20 +00:00
Antony Dovgal
7dd943ac5c MFH: fix #39127 (Old-style constructor fallbacks produce strange results) 2008-03-17 14:54:42 +00:00
Dmitry Stogov
3e7e9d4af6 Fixed bug #44141 (private parent constructor callable through static function) 2008-02-21 13:55:45 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Johannes Schlüter
1b6100f4c1 - MFH: Fix #43450 (Memory leak on some functions with implicit object
__toString() call) (Davic C.)
2007-12-21 20:56:33 +00:00
Dmitry Stogov
648fbe9d58 Fixed bug #43128 (Very long class name causes segfault) 2007-11-22 13:27:13 +00:00
Dmitry Stogov
c3ab6bd091 Fixed bug #43136 (possible crash on script execution timeout. The EG(function_state_ptr) is completely removed, EG(current_execute_data)->function_state must be used instead) 2007-11-20 09:51:12 +00:00
Sara Golemon
ee548c7bf3 MFH(r-1.192) Remove extraneous space in error/notice messages (felipe) 2007-11-17 21:52:02 +00:00
Dmitry Stogov
dd3c04cea1 Fixed bug #42937 (__call() method not invoked when methods are called on parent from child class). 2007-11-12 09:12:06 +00:00
Jani Taskinen
b489251177 - MFH from HEAD:
. Folding tags
  . Parameter parsing
  . SPL debug info
  . array function improvements (not all yet)
  . Improvements to function calling with call_user_* functions
  . Improvements to debugging info in var_dump/print_r
# I propably forgot already something but this all was pretty close tied
# to each other so it wasn't possible to do it in parts.
2007-11-02 19:40:39 +00:00
Stanislav Malyshev
988d28cc13 ws 2007-10-18 20:44:41 +00:00
Marcus Boerger
8ce1211a62 - MFH debug object helper 2007-10-11 01:03:19 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
b20ed0d2e0 Added support for __callstatic() magic method. (Sara) 2007-09-29 08:52:40 +00:00
Dmitry Stogov
7ec48cb37f Fixed bug #40757 (get_object_vars get nothing in child class)
Fixed bug #41929 (Foreach on object does not iterate over all visible properties)
2007-07-24 11:39:56 +00:00
Dmitry Stogov
ed10530eb5 Fixed bug #41961 (Ensure search for hidden private methods does not stray from class hierarchy). (robin_fernandes at uk dot ibm dot com) 2007-07-12 10:32:09 +00:00
Stanislav Malyshev
008259dba8 fix comment - guard system changed 2007-03-23 17:16:55 +00:00
Dmitry Stogov
e470e22e20 - Fixed bug #35106 (nested foreach fails when array variable has a reference).
- Fixed bug #36214 (__get method works properly only when conditional operator is used).
- Fixed bug #39449 (Overloaded array properties do not work correctly).
- Fixed bug #39990 (Cannot "foreach" over overloaded properties).
2007-01-10 15:58:08 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Dmitry Stogov
108a2fc64c Fixed bug #39775 ("Indirect modification ..." message is not shown)
The fix breaks two SimpleXML tests those must be fixed
2006-12-08 15:55:31 +00:00
Dmitry Stogov
41ae8de136 Fixed bug #39297 (Memory corryption because of indirect modification of overloaded array). 2006-11-08 13:38:28 +00:00
Dmitry Stogov
7e17f8591a Fixed bug #38772 (inconsistent overriding of methods in different visibility contexts) 2006-09-12 11:01:16 +00:00
Antony Dovgal
191d68618a delete commented part, as it was done in HEAD 2006-08-28 10:59:18 +00:00
Antony Dovgal
be316018fd apply correct fix for bug #38461 2006-08-15 20:30:42 +00:00
Antony Dovgal
08d398aa48 MFH: fix #38461 (setting private attribute with __set() produces segfault) 2006-08-15 13:19:13 +00:00
Dmitry Stogov
30f4d3f959 Fixed bug #38220 (Crash on some object operations) 2006-07-26 15:29:27 +00:00
Marcus Boerger
519ed8e13b - Better fix for #34505 and related, drop zend_unmangle_property_name_ex() 2006-07-24 17:58:32 +00:00
Dmitry Stogov
33a1a4d39a Changed error message (E_ERROR -> E_NOTICE) in case of indirect modification of overloaded property. 2006-07-21 10:32:17 +00:00
Marcus Boerger
704eced26b - MFH Fixed Bug #37667 (Object is not added into array returned by __get) 2006-07-10 00:36:28 +00:00
Antony Dovgal
058b529ae7 oops.. fix copy/paste typo 2006-07-05 11:54:08 +00:00
Antony Dovgal
c4c96c042e MFH: export zend_std_get_constructor() 2006-07-05 11:41:25 +00:00
Antony Dovgal
859ab9a4cf MFH: improve error messages 2006-07-05 11:39:00 +00:00
Marcus Boerger
1b172b1371 - MFH Bugfix #37632 (Protected method access problem) 2006-05-29 20:06:43 +00:00
Marcus Boerger
493f39da2d - MFH: Fix bug #37212 (Access to protected property of common base class)
By adding "zend_class_entry *ce" to struct zend_property_info;
2006-05-27 18:39:53 +00:00
Marcus Boerger
f16bdce284 - Enforece rule of disallowing throw in __toString() 2006-05-10 21:12:48 +00:00
Marcus Boerger
637a40423c - MFH as discussed
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
  . zend_get_error_exception()   -> zend_get_error_exception(TSRMLS_D)
  . added E_RECOVERABLE_ERROR
  . added ZEND_TOSTRING_FUNC_NAME
  . added __tostring function cache to zend_class_entry
  . added ZEND_NAMED_ME
  . modified ZEND_ME_MAPPING to support method flags
  . added ZEND_MN
  . method entries now use prefix "zim_" instead of "zif_"
  . drop EG(ze1_compatibility_mode)
  . changed cast handler, now without (int should_free):
    typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
  . changed get_iterator, now receives whether value is by ref:
    zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
  . added zend_objects_store_add_ref_by_handle
  . added zend_objects_store_del_ref_by_handle
  . convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Dmitry Stogov
8768ab94b3 Fixed bug #34729 (Crash in ZTS mode under Apache) 2005-12-01 11:48:17 +00:00
Dmitry Stogov
6b8bf38333 Fixed bug #35239 (Objects can lose references) 2005-11-16 11:52:27 +00:00
Dmitry Stogov
64931b62cc Allow recursive calls to __get/__set for different properties 2005-11-15 13:35:23 +00:00
Dmitry Stogov
a8c338aa65 Fixed bug #34893 (PHP5.1 overloading, Cannot access private property) 2005-10-20 09:47:12 +00:00
Dmitry Stogov
248345d920 Support for class constants and static members for internal classes 2005-09-01 10:05:32 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Dmitry Stogov
345e0255b5 Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods) 2005-07-07 16:07:09 +00:00
Dmitry Stogov
62bdbc0e57 Fixed possible crash on $x = $obj->$non_string 2005-06-20 18:25:24 +00:00
Dmitry Stogov
d1ee85c2dd Fixed bug #33277 (private method accessed by child class) 2005-06-17 10:50:45 +00:00
Dmitry Stogov
aedbdb087d Allowed return by refrence from internal functions 2005-06-16 14:56:13 +00:00
Stanislav Malyshev
2cb52151ac MF50: fix #29689 and more private property problems 2005-06-09 17:20:44 +00:00
Dmitry Stogov
d02d270f48 Fixed bug #30820 (static member conflict with $this->member silently ignored) 2005-06-08 08:08:18 +00:00
Dmitry Stogov
cd88e646fd Fixed bug #33171 (foreach enumerates private fields declared in base classes) 2005-06-06 07:52:08 +00:00
Dmitry Stogov
3d7b0bab28 Fixed memory allocation bugs related to magic object handlers (__get(), __set(),
...)
2005-06-03 11:16:19 +00:00
Dmitry Stogov
9383e1b858 Fixed bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded) 2005-06-01 11:03:58 +00:00
Stanislav Malyshev
94666dcfb6 revert - seems to be fixed elsewhere 2005-05-18 15:30:35 +00:00
Stanislav Malyshev
e04666ae20 fix #30451 static properties don't work properly 2005-05-18 15:14:36 +00:00
Dmitry Stogov
69326a796e Fixed destruction of zval after returning from __call() 2005-05-03 12:47:27 +00:00
Marcus Boerger
56d543c161 - Extend API to support real existance test without the need to add any new
functions or change any behavior
2005-05-02 16:18:02 +00:00
foobar
217e89b124 compile fix 2005-04-29 10:40:01 +00:00
Dmitry Stogov
9966587aaf Fixed bug #29015 (Incorrect behavior of member vars(non string ones)-numeric mem vars und others) 2005-04-28 17:40:11 +00:00
Dmitry Stogov
c81db6bc56 Fixed bug #29210 (Function: is_callable - no support for private and protected classes) 2005-04-27 15:45:36 +00:00
Andrei Zmievski
53e3b0fcb8 Reverting. Let's not introduce major BC breakage like this without a
good reason.
2005-04-25 20:41:26 +00:00
Marcus Boerger
79b9084eef - Fix logic 2005-04-17 20:15:23 +00:00
Marcus Boerger
adb3d0197e - No E_ERROR when we just check (where did my 0->1 change go on first commit?) 2005-04-08 12:24:09 +00:00
Marcus Boerger
40cc0b7724 - No E_ERROR when we just check, here visibility simply means there is none 2005-04-08 12:15:24 +00:00
Marcus Boerger
698d301c1c - Simplify getting property info and make it an api function 2005-04-08 11:35:11 +00:00
Marcus Boerger
6a6eaf2b72 - More fixes to gracefully act on exception thrown in overload methods 2005-03-19 15:32:18 +00:00
Marcus Boerger
cf020f1334 - Fix #31185 2005-03-19 15:06:39 +00:00
Marcus Boerger
b924ef8796 - Don't touch refcount/is_ref 2005-03-11 00:44:34 +00:00
Marcus Boerger
a586cecf35 - If silence if wanted we do not error out 2005-02-27 22:22:26 +00:00
Dmitry Stogov
fd4fe1c8d3 Fixed bugs #29767 and #31683 (__get and __set methods must not modify property name). 2005-02-02 07:19:22 +00:00
foobar
20be664666 - Fixed bug #29183 (Undefined symbol zend_check_private with Solaris CC) 2005-01-19 01:46:26 +00:00
Andi Gutmans
235e6c0afe - Fixed Bug #30562 Segmentation fault with __call() 2004-12-17 22:24:51 +00:00
Marcus Boerger
c5a9a5a284 - Change zend_object_handlers->get_method() to allow aggregation for internal classes 2004-10-30 19:11:37 +00:00
Marcus Boerger
e39f3f3f48 Simplify/Optmize magic method calls (__get/__set/__call/__clone/__destruct) 2004-09-28 22:55:22 +00:00
Zeev Suraski
34b00ca22a Fix bug in handling of protected properties 2004-07-22 11:54:27 +00:00
Stanislav Malyshev
e000da960b __set and __get will be called not only when variable doesn't exist but also when it's
invisible
2004-07-19 14:26:53 +00:00
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Stanislav Malyshev
d673ec0184 be consistent with write_dimension 2004-07-14 09:04:13 +00:00
Stanislav Malyshev
28d72ce2fd fix #28957 2004-07-14 09:01:58 +00:00
Wez Furlong
6f5c0992a3 Fix leak on systems where alloca isn't really alloca. 2004-05-26 22:19:44 +00:00
Wez Furlong
d056b25c3f Add count_elements handler for overloaded objects. 2004-05-04 15:03:28 +00:00
Andi Gutmans
4a24cbe276 - Fix bug #26441 (When __set() returned a value it corrupted it) 2004-04-09 14:42:06 +00:00
Stanislav Malyshev
bd9b600c3c API change for read_property:
instead of bool silent it now gets fetch type
This can be used for creating proxy objects for write contexts
2004-03-21 18:07:27 +00:00
Andi Gutmans
88de69b97c - Support Cast operator in convert_to_* so that we support internal
- extensions such as SimpleXML. This is for Sterling.
2004-03-14 13:52:36 +00:00
Andi Gutmans
62b81df9b0 - This was too strict. 2004-02-12 14:31:13 +00:00
Zeev Suraski
e7e0f7d4b4 - Check return-by-reference bit when implementing interface prototypes
- Add infrastructure for built-in functions to hint whether they
  return by reference or not.  It is NOT currently used for anything,
  except for interface prototypes (you can use it to request that the
  function that implements your prototype returns by reference or
  doesn't return by reference).
  For downwards compatibility - by default, interface prototypes are
  agnostic as to whether the function that implements them returns
  by reference or not.  Use ZEND_BEGIN_ARG_INFO_EX() with
  ZEND_RETURN_VALUE/ZEND_RETURN_REFERENCE to change that.
- Fix ArrayAccess::getOffset() to conduct additional checks.
  If your getOffset() should work with multidimensional arrays - it
  must return by reference.
2004-02-12 13:49:55 +00:00
Zeev Suraski
473927ece8 Fix write-mode of overloaded objects when using array dimensions 2004-02-08 17:23:20 +00:00
Zeev Suraski
c5a7b668cd - Clean garbage (delete was nuked a long time ago) 2004-02-03 15:37:37 +00:00
Ilia Alshanetsky
0a8a950fcf Expose zend_std_call_user_call(), needed for implementation of things like
__call handlers.
2004-01-17 00:39:28 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Stanislav Malyshev
1e11e7401c Bug #24608 - fix interaction between __accessors and get_property_ptr 2004-01-05 11:45:46 +00:00
Derick Rethans
6923a16c26 - Fixed var_export() to show public, protected and private modifiers properly.
- Exported (un)mangle_property_name.
2004-01-03 13:51:02 +00:00
Marcus Boerger
db36fd0200 Fix __tostring() and concatenation 2003-12-27 20:16:49 +00:00
Marcus Boerger
06788f0438 Fixed bug #26675 (Segfault on ArrayAccess use)
Update NEWS
2003-12-22 16:27:14 +00:00
Wez Furlong
273c19334b export these symbols for use by SPL as a shared extension 2003-12-22 13:09:15 +00:00
Marcus Boerger
49efcd4f27 Fixed bug #24837 Incorrect behaviour of PPP using foreach. 2003-12-18 20:07:30 +00:00
Stanislav Malyshev
052032f5ec export externally used functions 2003-12-16 10:51:21 +00:00
Marcus Boerger
d4f64f88ba Reenable __tostring() magic for print,echo,concatenation,function naming...
but not for other internal things.
# As discussed with Andi
2003-12-15 16:59:21 +00:00
Marcus Boerger
904373a830 Handle getter failure and allow to bypass thrown exceptions. 2003-12-11 09:56:06 +00:00
Marcus Boerger
ff57d33fe2 Remove automatic call to __toString() since it is supposed to cause too
much trouble. See discussion on the mailing list.
2003-12-02 22:08:51 +00:00
Marcus Boerger
87577dd881 The macro REPLACE_ZVAL_VALUE cannot be used since we only have zval *
writeobj. to allow it the api needs to be changed to zval **writeobj.
2003-11-27 19:08:28 +00:00
Marcus Boerger
4dba05d9cc Add new interface ArrayAccess to use objects as Arrays 2003-11-24 20:57:54 +00:00
Marcus Boerger
e7365f316c Correct default handlers 2003-11-10 20:44:50 +00:00
Marcus Boerger
48d249de46 Fix those warnings 2003-11-10 16:23:12 +00:00
Marcus Boerger
296529b886 Split isset/isempty for object property and object dimension hooking. 2003-11-10 16:14:44 +00:00
Marcus Boerger
316854323d Handle exceptions in casting more gracefully.
This fixes bug #26166
2003-11-08 14:06:08 +00:00
Moriyoshi Koizumi
68bab385cb __tostring() handler should be binary-safe 2003-11-04 17:34:56 +00:00
Zeev Suraski
4de32429f5 Remove unused callback 2003-10-05 08:27:31 +00:00
Zeev Suraski
3f5acc73a5 Remove redundant callback, simplify API 2003-10-05 07:52:28 +00:00
Marcus Boerger
d7fdf15a41 - Allow partial type conversion support for objects.
- Add support for object to string conversion from userspace by method
  __toString() and add a test.
2003-09-18 11:38:33 +00:00
Marcus Boerger
95649ab260 Tests show updating consts must happen once at runtime (revert optimization).
Add tests for static properties.
2003-09-04 16:00:01 +00:00
Marcus Boerger
1b39a5aa2c Fix static properties.
#
# There's only an errormessage missing which i'll wommit as soon as i find out
# how to do it best. But besides that damn message everything works now and all
# inheritance rules apply.
#
2003-09-03 16:13:40 +00:00
Marcus Boerger
9702c70a35 Synch/Unify error messages related to function/method calls 2003-09-02 14:08:59 +00:00
Marcus Boerger
744dd20520 Fix warnings 2003-08-17 19:14:30 +00:00
Sascha Schumann
b29b4441db Restrict scope of inline functions to compile unit
Submitted by: Jason Greene <jason@inetgurus.net>
2003-08-15 21:02:35 +00:00
Zeev Suraski
f8bbafd604 ntroduce infrastructure for supplying information about arguments,
including:

- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance

Both user and builtin functions share the same data structures.

To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:

ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
    ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
    ZEND_ARG_PASS_INFO(0)
    ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();

and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.

The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.

The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Zeev Suraski
c0b46739ca Improve array overloading - support unset($foo["bar"]) 2003-07-30 17:12:06 +00:00
Zeev Suraski
6a50660cfe Fix isset()/empty() for non-trivial object elements
(API change - read_property now accepts an extra element)
Fixes bug #24436
2003-07-22 13:49:33 +00:00
Zeev Suraski
7e72d8e826 Fix bug #24499 2003-07-21 12:13:16 +00:00
Zeev Suraski
3cfa6a68f4 Add get_dim callback 2003-07-07 10:53:27 +00:00
Zeev Suraski
ae6a1e7e4e whitespace 2003-07-07 09:12:15 +00:00
Zeev Suraski
765f349ecd fixlet 2003-07-07 09:01:22 +00:00
Zeev Suraski
938c0fbc19 Initial support for overloading of array syntax for objects (very initial) 2003-07-07 09:00:36 +00:00
Marcus Boerger
35c40932e8 Fix destructor visibility 2003-07-01 19:13:50 +00:00
Ilia Alshanetsky
9754535255 Fixed bug #24279 (__get() crash when no value is returned) 2003-06-29 23:41:49 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Zeev Suraski
636e9cc6a4 Fix casing issues in access level checks 2003-06-08 19:28:29 +00:00
Stanislav Malyshev
039c174337 rm namespace leftovers 2003-06-04 08:16:55 +00:00
Stanislav Malyshev
f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00
Sterling Hughes
ae2bfb7880 Assume lazy consensus regarding the cast_object() patch. *Only* implemented
from a internals perspective.  This callback has been very useful for both
ext/mono and ext/simplexml
2003-05-27 18:52:25 +00:00
Marcus Boerger
66b9125968 Make use optimized string lowering 2003-05-21 22:57:51 +00:00
Stanislav Malyshev
ad01495a48 Change get_class() so that it returns qualified names for namespaced
classes.

*HEADS UP*: get_class_name() handler interface is changed, now it should
allocate the space it returns with emalloc, and the users free it. If
anyone has problems with it or has suggestions how to do it without this -
please tell.

Also: make function_exists() understand namespaces.
2003-04-21 17:01:34 +00:00
Andrei Zmievski
62f9eb8006 Split ZEND_NAMESPACE into user and internal namespaces. Hope this is
okay with engine folks.
2003-04-01 19:37:04 +00:00
Sebastian Bergmann
866332a4b8 Eliminate TSRMLS_FETCH() calls in zend_objects_new() and zend_objects_get_address(). 2003-03-26 06:32:53 +00:00
Zeev Suraski
40326f6adf - Fix situation where a derived class declares a public (or implicit public)
with the same name as a private in the parent
- Optimize 'static binding' of private properties a bit
2003-03-18 16:30:23 +00:00
Zeev Suraski
d405373270 Fix handling of ::func() 2003-03-11 23:19:45 +00:00
Zeev Suraski
d22cc2f329 Improve handling of static member variables 2003-02-17 14:06:39 +00:00
Stanislav Malyshev
e77eca7568 namespace patch - static variable access 2003-02-16 11:15:30 +00:00
Zeev Suraski
884419044b Fix error handling in illegal property access 2003-02-13 22:47:25 +00:00
Stanislav Malyshev
10b6a84b74 update static constants too 2003-02-10 10:57:14 +00:00
Zeev Suraski
029abf8c51 Restore missing check 2003-02-10 10:03:19 +00:00
Zeev Suraski
fce275eb41 Improve PPP handling of properties 2003-02-07 10:05:36 +00:00
Zeev Suraski
fc591167ad Fix check 2003-02-06 00:15:02 +00:00
Zeev Suraski
f660d28143 - read_property cleanup
- Implement unset/isset/empty for PPP
2003-02-05 14:27:30 +00:00
Zeev Suraski
17439aa9c4 Rework static class properties - now supports access restrictions 2003-02-05 13:35:52 +00:00
Zeev Suraski
da12870c68 Add PPP support for arrays 2003-02-05 09:41:31 +00:00
Zeev Suraski
e1179a4d40 Missing update 2003-02-04 14:12:59 +00:00
Zeev Suraski
471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +00:00
Zeev Suraski
61bd944b32 Core rearrangements - move Zend Objects specific code to their
specific implementation file
2003-02-02 16:17:25 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Zeev Suraski
4b97a8dffd Code rearrangements 2003-01-29 15:02:57 +00:00
Zeev Suraski
8f52bf6835 Fix assignments to $this.
Fixes the 'make install' problem reported on php-dev
2003-01-29 08:55:12 +00:00