Marcus Boerger
1d5f721fd9
- MFH Sync error messages and simplify error message generation code
2006-05-26 00:36:13 +00:00
Marcus Boerger
7577130156
- MFH improve error messages
2006-05-21 18:10:31 +00:00
Dmitry Stogov
963c7fa016
Optimized require_once/include_once (eliminated fopen() on second usage)
2006-05-15 15:31:27 +00:00
Marcus Boerger
7a5240e846
- MFH missing bits and pieces of the partial sync with head
...
# This time i added:
# ZEND_FE_RESET_VARIABLE
# ZEND_FE_RESET_REFERENCE
# and dapted parser,compiler,executor,interfaces to handle these flags
# their purpose is to be able to pass whetehr foreach is done by ref to
# the current() handler so that it can error out in case it is not capable
# to comply to the requested return signature/protocol/semantics (weyp).
2006-05-11 21:07:39 +00:00
Marcus Boerger
0dacd6d5c0
- ze1 cleanup (bjori) /thx
2006-05-10 19:41:34 +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
Marcus Boerger
5a69b29082
- Warning fixes by Steph
2006-02-26 10:57:00 +00:00
Dmitry Stogov
c447acf863
Fixed bug #36071 (Engine Crash related with 'clone')
2006-01-19 07:23:32 +00:00
Andi Gutmans
61e93ccfe8
- Update copyright notices to 2006
2006-01-04 23:53:05 +00:00
Dmitry Stogov
56d78654a3
Reverted invalid fix for bug #35785
2005-12-26 08:18:38 +00:00
Marcus Boerger
9a6a266b16
- MFH Fixed Bug #35785 (SimpleXML memory read error)
2005-12-23 20:32:15 +00:00
Dmitry Stogov
ad90780930
Fixed memory leak
2005-12-22 09:16:11 +00:00
Dmitry Stogov
6b8bf38333
Fixed bug #35239 (Objects can lose references)
2005-11-16 11:52:27 +00:00
Dmitry Stogov
681405fc4a
Fixed bug #35017 (Exception thrown in error handler may cause unexpected behavior)
2005-10-31 19:25:14 +00:00
foobar
eb7e9b6bfc
- Fixed error message grammar
2005-09-15 13:10:31 +00:00
Marcus Boerger
650b76e542
- MFH: Improve error message
2005-09-14 18:23:48 +00:00
Sara Golemon
196e54fc43
MFH(r-1.719) Plug leak of 1/2 bytes when converting from string/unicode
2005-09-12 17:44:21 +00:00
Dmitry Stogov
4f161fe289
Fixed bug #34137 (assigning array element by reference causes binary mess)
2005-09-01 13:21:37 +00:00
Dmitry Stogov
32d69c853a
Fixed bug #33996 (No information given for fatal error on passing invalid value to typed argument)
2005-08-05 09:35:09 +00:00
foobar
916815b779
Bump up the year
2005-08-03 13:30:58 +00:00
Dmitry Stogov
7aca138456
Fixed bug #33710 (ArrayAccess objects doen't initialize $this)
2005-07-19 07:33:00 +00:00
Dmitry Stogov
343af548a6
Fixed SIGSEGV on 'global ${"{$blah}_ID"};'
2005-07-04 13:24:46 +00:00
Stanislav Malyshev
fb0c96d07b
fix conditions for freeing
2005-06-29 08:44:01 +00:00
Antony Dovgal
aa88cd901f
fix leak: when dup was <success>ful zend_std_object_get_class_name() returns SUCCESS aka 0
2005-06-28 22:04:07 +00:00
Stanislav Malyshev
b95ec3528a
fix previous patch
2005-06-28 12:42:56 +00:00
Stanislav Malyshev
e3601d22a7
fixes for non-php objects
2005-06-28 10:49:56 +00:00
Dmitry Stogov
2037023874
Fixed bug #27268 (Bad references accentuated by clone).
2005-06-23 08:21:03 +00:00
Marcus Boerger
7f544adbb5
- Fix TSRM build
2005-06-16 17:29:29 +00:00
Dmitry Stogov
aedbdb087d
Allowed return by refrence from internal functions
2005-06-16 14:56:13 +00:00
Stanislav Malyshev
999998ecaa
rename to zend_
2005-06-16 14:27:08 +00:00
Dmitry Stogov
faacd7f865
Compilation warnings
2005-06-16 12:26:44 +00:00
Stanislav Malyshev
87c9e68c91
export zval getters
2005-06-16 11:50:08 +00:00
Dmitry Stogov
14b80ad199
Specializer optimization
2005-06-13 17:50:07 +00:00
Dmitry Stogov
cec2347c96
Fixed bug #33212 ([GCC 4]: 'zend_error_noreturn' aliased to external symbol 'zend_error').
...
The fix is not tested on Solaris and DARWIN!
2005-06-13 11:22:59 +00:00
Dmitry Stogov
84b96e9b03
Fix so that extensions like xdebug, can overload opcodes in all execution modes including goto/switch
2005-06-10 09:54:38 +00:00
Dmitry Stogov
4658513d70
fixed memory leak in bug #28972 ([] operator overflow treatment is incorrect), not the bug itself.
2005-06-07 10:21:52 +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
1a72341328
Added array type hinting. (This patch requires full re-make)
2005-05-26 13:46:17 +00:00
Dmitry Stogov
b2d28102a8
Fixed bug #30641 (Compile error: error: symbol "zend_error" is used but not defined)
2005-05-04 12:38:49 +00:00
Dmitry Stogov
8db238b075
Fixed bug #32852 (Crash with singleton and __destruct when zend.ze1_compatibility_mode = On)
...
Fixed bug #31828 (Crash with zend.ze1_compatibility_mode=On)
Fixed bug #32080 (segfault when assigning object to itself with zend.ze1_compatibility_mode=On)
2005-04-29 07:03:54 +00:00
Andrei Zmievski
4fbddd03d7
Fix certain operations to stop relying on presence of read_property and
...
write_property handlers. They may be NULL'ed out by certain objects
pretending to be pure arrays, for example. Do checks first.
2005-04-15 17:15:18 +00:00
Andrei Zmievski
992c28db75
Consolidate: call _get_zval_ptr_var() for IS_VAR case in
...
_get_zval_ptr().
2005-03-23 21:05:56 +00:00
Andi Gutmans
8838c0f860
- Two new API calls for Derick (retreive CV name and value) by Dmitry
2005-01-22 02:29:18 +00:00
Dmitry Stogov
30445fb661
Fixed bug #28444 (Cannot access undefined property for object with overloaded property access).
2005-01-18 09:05:39 +00:00
Dmitry Stogov
72d02269a9
Restore behavior of $str["str"]. (Now $str["str"] is equivalent to $str[0] again)
2005-01-14 09:01:22 +00:00
Dmitry Stogov
ce0884c287
Additional fix for fix of bug #29883
2005-01-13 08:49:06 +00:00
Dmitry Stogov
6fa37163f2
Fixed bug #31098 (isset false positive)
2005-01-12 09:18:31 +00:00
Dmitry Stogov
beaff87d50
"Undefined variable: %s" noticies were fixed to use one space
2004-12-27 13:43:26 +00:00
Dmitry Stogov
e986a1f47e
"Undefined variable: %s" noticies were fixed to be compatible with PHP_5_0
2004-12-24 08:24:55 +00:00
Moriyoshi Koizumi
ae78d7d4bf
- Checks for Darwin'ish systems that uses Mach-O, which apparently doesn't
...
support weak symbol aliasing at this time.
2004-11-03 23:05:18 +00:00
Andi Gutmans
e50a6fde11
- Commit new VM
...
- Old one is tagged as PRE_NEW_VM_GEN_PATCH
- Still doing work so more commits to come. Don't complain (yet) :)
2004-10-22 21:42:14 +00:00
Andi Gutmans
fd92acac4f
- Fix crash (MFB PHP5_0)
2004-10-22 01:55:39 +00:00
Dmitry Stogov
3d383e45dc
Fixed unset() bug that was introduced with CV optimization patch
2004-10-05 09:09:18 +00:00
Andi Gutmans
db507dd153
- Commit the variable fetch optimization.
...
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Andi Gutmans
f82ed13625
- Commit new VM architecture. This one allows people (aka Derick) to
...
- ask the engine to use function handler mode. Will update the README
- about that.
2004-09-23 21:43:32 +00:00
Anantha Kesari H Y
b04db9d9e0
Reverted the NetWare Specific Stack limit related patches as asked by Andi
2004-09-23 06:23:36 +00:00
Anantha Kesari H Y
8eb7503078
Stack limit will be checked while executing the script
2004-09-22 14:20:19 +00:00
Dmitry Stogov
3009a073b0
Fixed bug #29566 (foreach/string handling strangeness (crash)).
2004-09-22 07:14:26 +00:00
Dmitry Stogov
81a5af36a1
Fixed bug in fix for bug #29707
2004-09-22 06:32:19 +00:00
Andi Gutmans
d9252aa1ea
- Fix for bug #29707
2004-09-21 22:09:22 +00:00
Stanislav Malyshev
29fec3febc
Antony Dovgal's error message improvement - #27290
2004-09-13 10:41:39 +00:00
Andi Gutmans
96ab56e146
- Roll back VM commit
2004-09-09 16:47:22 +00:00
Andi Gutmans
8eb8850c90
- Some architectural changes:
...
a) We specialize opcodes according to op_type fields. Each opcode has to
be marked with which op_type's it uses.
b) We support different execution methods. Function handlers, switch()
and goto dispatching. goto seems to be the fastest but it really
depends on the compiler and how well it optimizes. I suggest playing
around with optimization flags.
- Warning: Things might break so keep us posted on how things are going.
(Dmitry, Andi)
2004-09-08 22:14:12 +00:00
Stanislav Malyshev
4f68f3774c
fix crash #29893
2004-08-30 08:57:40 +00:00
Marcus Boerger
0eaa26fc31
String offset starts with 0, fix isset($str[$len])
2004-08-29 19:15:08 +00:00
Andi Gutmans
a36e7b0ab1
- Cleanup
2004-08-19 20:42:20 +00:00
Andi Gutmans
edb7c7d4f5
- Stop using garbage. Please let me know if you find any bugs resulting
...
- of this patch (very likely). (Dmitry, Andi)
2004-08-19 20:03:06 +00:00
Andi Gutmans
993f70c1d2
- Don't use magic numbers
2004-08-12 05:54:11 +00:00
Andi Gutmans
de25255b6d
- Significantly improve performance of foreach($arr as $data). (Marcus)
2004-08-12 05:41:01 +00:00
Marcus Boerger
be022a813f
More meaningfull error message
2004-08-11 20:19:49 +00:00
Marcus Boerger
51505045e6
- Fix warnings
2004-08-10 07:01:54 +00:00
Ilia Alshanetsky
d746343928
A gentler (performance wise) allocation of buffer for temp variables.
2004-08-02 02:35:01 +00:00
Andi Gutmans
d7c839d54f
- More ptr_stack optimizations and cleanups
2004-07-30 21:00:37 +00:00
Andi Gutmans
138ef9a43e
- Improve performance by inlining zend_ptr_stack_n_push(). var_args can
...
usually not be inlined by compilers.
2004-07-30 20:16:40 +00:00
Sara Golemon
d96e7a170c
Revert goto opcode
2004-07-29 17:45:31 +00:00
Sara Golemon
37acb31c1a
&tmp and label are the same thing, don't free it till we're done with it.
2004-07-29 16:49:59 +00:00
Sara Golemon
8c844fdde3
Plug some memory leaks and promote unknown label to E_ERROR.
...
If someone tries to jump to a non-existant label execution really
shouldn't try to carry on.
2004-07-29 16:36:00 +00:00
Sara Golemon
5865b3680a
Add goto operator by popular request.
2004-07-29 15:23:47 +00:00
Marcus Boerger
f5cf052225
- Fix bug #29368 : The destructor is called when an exception is thrown from the constructor
2004-07-25 17:25:44 +00:00
Marcus Boerger
5ff2111a59
Fix 0 Byte leak after alloca to emalloc change
2004-07-23 07:13:54 +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
Marcus Boerger
381a3b234f
Bugfix #28464 catch() does not catch exceptions by interfaces
2004-07-16 06:39:50 +00:00
Ilia Alshanetsky
a8996a8ac6
Fixed bug #29086 & #28064 (PHP crashes on extremly long scripts).
2004-07-12 17:47:29 +00:00
Sara Golemon
a4032b68c6
Ease off on severity of new error (Using Resources as array offsets)
2004-06-24 16:35:34 +00:00
Sara Golemon
56b153390b
BugFix #28879 Inconsistent behavior between explicit and implicit array creation.
...
Changes:
Throw E_WARNING "Illegal offset type" when explicitly creating
array elements with objects, arrays, or resorces as indexes.
This matches implicit creation w/ obj/arr indices.
Throw E_WARNING "Resource ID#%ld used as offset, casting to integer (%ld)"
when implicitly creating array with resource as index. (BC)
2004-06-23 23:20:44 +00:00
Sara Golemon
2f7c5d30b5
Another typo in converting array index doubles to long.
2004-06-18 18:33:46 +00:00
Stanislav Malyshev
176f6d8e6e
fix incdec - make value's refcount non-zero when passing to
...
write_property - otherwise __set caller cleanup could kill it.
2004-06-02 12:48:19 +00:00
Marcus Boerger
0ef420a71e
Prevent possible problems with illegal properties
2004-05-28 08:55:10 +00:00
Andi Gutmans
bca3e30484
- Fix problem with exceptions returning from include(). (Dmitry)
2004-05-27 11:59:58 +00:00
Sara Golemon
b094db390e
Bugfix#28404 When type is double we need to access dval, not lval
2004-05-18 00:04:22 +00:00
Stanislav Malyshev
239ae7b5fc
Fix bug #27876
2004-04-29 09:47:29 +00:00
Marcus Boerger
a455d7846d
Handle failure in get_current_data
2004-04-15 21:32:34 +00:00
Ilia Alshanetsky
962c8cc9ef
Fixed reversed condition for error reporting.
2004-04-01 22:05:35 +00:00
Dmitry Stogov
d00b6c7c99
Fixed BUG in zend_post_incdec_property
2004-03-31 15:16:00 +00:00
Sebastian Bergmann
c29e9277d0
-clonning+cloning
2004-03-29 15:20:50 +00:00
Dmitry Stogov
75d1e4ca7d
Implicit clonning strict warning was added for ze1_compatibility_mode
2004-03-29 15:00:31 +00:00
Ilia Alshanetsky
62c80d5e6e
Fixed bug #27731 (error_reporting() inside @ block fails to set
...
error_reporting level).
2004-03-29 00:50:52 +00:00
Stanislav Malyshev
9be3c9388b
- call set handler if assigning to object having this handler
...
- cleanup: use macros to access object internal vars
2004-03-28 14:57:29 +00:00
Andi Gutmans
43d04ee291
- Fix build (thanks to Timm)
2004-03-26 00:26:19 +00:00
Stanislav Malyshev
7a98f60e1b
no need to use result for RECV's - as in PHP4
2004-03-25 14:03:34 +00:00
Stanislav Malyshev
3c3dbc8873
Use get/set handlers for increment.decrement ops on objects
2004-03-25 13:03:04 +00:00
Dmitry Stogov
ec53815b0f
Object cloning in ze1 compatibility mode (zend.ze1_compatibility_mode) was reimplemented (Dmitry, Andi)
2004-03-24 10:55:04 +00:00
Andi Gutmans
94dc9af5a0
- Remove whitespace
2004-03-22 11:16:24 +00:00
Andi Gutmans
4ccca568bb
- Improve consistency
2004-03-21 21:29:17 +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
f0b5eeb17b
- Nuke unused code
2004-03-21 17:48:51 +00:00
Zeev Suraski
b8275175ff
Fix possible data corruption with __set()
2004-03-18 14:03:58 +00:00
Stanislav Malyshev
f52edc19a7
Improve error message - on E_STRICT, method is actually called,
...
so the error shouldn't say it cannot be called.
2004-03-18 13:28:05 +00:00
Andi Gutmans
5569ad0626
- Fix tiny bug (one of the reasons we can't support __toString() for
...
- regular objects).
2004-03-17 16:18:24 +00:00
Andi Gutmans
ccb515afc7
- Fixed problem with __toString(). Due to the engine's architecture it is
...
- currently not possible to call __toString() anywhere besides print & eval.
- Follow up will be on internals@
2004-03-17 15:48:49 +00:00
Andi Gutmans
0041aff953
- Error out if get_method() isn't defined.
...
- Use calling scope of internal function callee when calling a method
using static syntax (array("A", "func"));
2004-03-16 14:39:07 +00:00
Marcus Boerger
09e76476ef
Improve error message
2004-03-16 10:14:57 +00:00
Marcus Boerger
50ee116f08
Clearify the different method/class flags (as discussed with Andi).
2004-03-09 16:38:37 +00:00
Andi Gutmans
0fc9d5861d
- Nuke unused code.
2004-03-09 15:27:39 +00:00
Marcus Boerger
6b0f57ee50
Rename hasMore() to valid() as discussed. (Part II)
2004-03-08 18:05:41 +00:00
Andi Gutmans
7c9694d26e
- Fix leak (Dmitry)
2004-03-02 10:13:43 +00:00
Derick Rethans
ed242f7e9e
- Initialize memory to \0 so that we can reliable detect whether a specific
...
opcode element is in use.
#- Stas thinks it's OK ;-)
2004-02-29 16:00:50 +00:00
Stanislav Malyshev
deba01c64e
export opcode table
2004-02-29 15:04:22 +00:00
Marcus Boerger
f449c8fdf7
Fixes for abstract classes/methods
2004-02-27 09:14:55 +00:00
Zeev Suraski
62e921f824
Fix leak in foreach ($o->mthd()->arr)
2004-02-25 17:23:50 +00:00
Zeev Suraski
7086634a0b
- Improve ARG_INFO() macros to support supplying required_num_args
...
- Initial fix for foreach($o->mthd()->arr) crash (now leaks)
2004-02-25 14:56:45 +00:00
Zeev Suraski
eb6fd52e21
- Rename compatiblity mode to zend.ze2_compatibility_mode (it doesn't only affect auto-clone).
...
- Perform implementation checks even with simple inheritance (off when
compatibility mode is enabled).
- Restore default arguments in interfaces and handle it correctly.
- Move registration of internal classes later in the startup sequence
in order to have INI options available.
2004-02-25 10:57:10 +00:00
Andi Gutmans
5cad7a2b4a
- Remove old code
2004-02-12 15:23:06 +00:00
Zeev Suraski
00ed3bad29
Centralize exceptions code in zend_exceptions.[ch].
...
Remove zend_default_classes.h (use zend_exceptions.h instead)
NOTE: This currently breaks the build, fixes to php-src and pecl coming
soon
2004-02-12 10:38:14 +00:00
Andi Gutmans
e189d89672
- Use zend_throw_exception_object() in throw_handler to make sure it
...
- does all the checks
2004-02-12 10:28:33 +00:00
Zeev Suraski
d91fc5fa3c
Fix leaks in assignments to overloaded objects
2004-02-11 19:12:16 +00:00
Zeev Suraski
3d4c7922e1
Fix leak with overloaded objects, when they're used just "for the hell
...
of it" :)
2004-02-11 16:28:46 +00:00
Zeev Suraski
aac72ce090
Fixed a bug the caused overloaded array indices to be converted to strings
2004-02-11 15:56:13 +00:00
Zeev Suraski
30f1be78c2
Turn off bogus warnings with overloaded dimensions and += (and friends)
2004-02-11 15:50:23 +00:00
Zeev Suraski
cc8c9ef2ec
Improve the implementation of unset() on array dimensions to be more
...
consistent with that of regular variables and string offsets
2004-02-11 13:58:29 +00:00
Zeev Suraski
79a58abbbf
Fix bug #26698 (exceptions handled properly during argument passing to functions)
2004-02-10 17:01:55 +00:00
Zeev Suraski
57aaad0dec
Fix refcounting of ++/+= overloading (fix leak in __get()/__set()
...
based classes)
2004-02-10 14:52:14 +00:00
Zeev Suraski
de583b2f91
Fix handling in assignment using multidimensional array syntax to string
...
offset ($s = "FUBAR"; $s[0][0] = 1;)
2004-02-10 11:39:52 +00:00
Zeev Suraski
d082fb03ee
Fix exception handling in opcodes spanned across multiple oplines (fixes the crash in __set())
2004-02-10 10:07:46 +00:00
Zeev Suraski
439396188c
- Fix pre/post increment for overloaded objects
...
- Fix binary-assign-op for overloaded objects
NOTE: This requires the implementation of the 'get' callback!
2004-02-10 09:29:42 +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
c5d842279c
Reinstate early-binding for classes.
...
Note that this is available for downwards compatibility only - and it doesn't
work if you use new features (namely, interfaces). Generally, people should
declare their classes before using them, but we just didn't want hell to break
loose (c)
2004-02-04 16:30:15 +00:00
Zeev Suraski
27f54a4c13
- Improve wording
2004-02-04 11:47:54 +00:00
Ilia Alshanetsky
871d8bdb57
More unneeded code removed.
2004-02-03 14:33:32 +00:00
Zeev Suraski
60bb89c505
Abort on parse error in an include file (patch by Ilia)
2004-02-03 14:32:02 +00:00
Zeev Suraski
8013d5fa39
Fix try/catch block logic
2004-02-03 13:42:41 +00:00
Zeev Suraski
9e60cb553f
Rewrote exception support. Fixes a few limitations and bugs in the old
...
implementation, and allows exceptions to 'fire' much earlier than before.
Instructions on how to use the new mechanism will follow on internals@
shortly...
Note - this (most probably) breaks the current implementation of
set_exception_handler()
2004-02-03 12:17:09 +00:00
Ilia Alshanetsky
b4e882d013
Apply the same parse error handling to (include|require)_once as the one for
...
their non-once counterparts.
2004-01-30 02:22:17 +00:00
Zeev Suraski
ae0e9e62dd
Whitespace
2004-01-28 10:24:57 +00:00
Ilia Alshanetsky
0cb89236a3
Fixed bug #26814 (On parse error include included file, terminate
...
execution script).
2004-01-25 23:54:12 +00:00
Marcus Boerger
6e2cf148a4
Respect proeprty visibility in foreach
2004-01-25 13:32:02 +00:00
Marcus Boerger
3ca44539a1
Switch from ZEND_ACC_DYNAMIC to ZEND_ACC_ALLOW_STATIC and disallow calling
...
internal non-static methods statically.
# As discussed with Zeev:
# - For BC standard userspace methods allow this with an E_STRICT message.
# - If you want to implement an internal method taht can be called both
# statically and non-statically then use flag ZEND_ACC_ALLOW_STATIC.
# - Magic user space methods __*() cannot and __construct, __destruct,
# __clone can never be called statically.
2004-01-24 16:59:24 +00:00
Sebastian Bergmann
1e902b696d
Change message as proposed by Jon.
2004-01-24 04:59:47 +00:00
Marcus Boerger
6020ffd007
Simplify detection of methods that must be called dynamic (with object)
2004-01-23 22:04:42 +00:00
Marcus Boerger
79e7145cc7
Disallow calling __clone/__construct/__destruct static
...
Send an E_STRICT when calling a non static method static
2004-01-23 20:58:23 +00:00
Andi Gutmans
21f09643ec
- Hopefully fix bug #26696 .
...
- Please let me know if hell-breaks loose
2004-01-19 12:22:02 +00:00
Stanislav Malyshev
e321eba06b
Fix Bug #26077 - memory leak when new() result is not assigned
...
and no constructor defined
2004-01-09 13:52:19 +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
Marcus Boerger
1d2b4bcc48
Reimplement part of Bug #24608 that was reverted too
2004-01-07 00:24:58 +00:00
Marcus Boerger
82f0c9e7aa
Revert patch that allowed to call sttaic methods via $method()
2004-01-07 00:02:04 +00:00
Marcus Boerger
18ea05b746
Fixed bug #26802
2004-01-05 22:45:11 +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
046859493e
Fix (string) conversion
2003-12-29 22:01:47 +00:00
Marcus Boerger
1dec2d85d6
Fix warning
2003-12-25 20:08:22 +00:00
Marcus Boerger
d28d247c4a
Fix warning
2003-12-25 19:59:38 +00:00
Dmitry Stogov
5adf502a69
Error reporting on unset string offset was added (Bug #24773 Zend/tests/bug24773.phpt)
2003-12-19 11:26:52 +00:00
Dmitry Stogov
25a811da65
Assign_op operators (+=) were fixed for elements of overloaded objects
2003-12-19 11:22:13 +00:00
Andi Gutmans
38beff5c92
- Nuke C++ comment
2003-12-18 23:30:22 +00:00
Andi Gutmans
3546d86052
- Revert patch 1.566
2003-12-18 23:28:15 +00:00
Marcus Boerger
49efcd4f27
Fixed bug #24837 Incorrect behaviour of PPP using foreach.
2003-12-18 20:07:30 +00:00
Zeev Suraski
24298e523f
This part of the if was necessary after all.
...
Refix bug #22510
2003-12-17 17:06:34 +00:00
foobar
a1a69ae16b
ws + cs (no c++ comments in c code)
2003-12-15 13:20:53 +00:00
Dmitry Stogov
ceb7c536d5
Bug #24773 was fixed (Zend/tests/bug24773.phpt)
...
Assign_op operators (+=) were fixed for elements of overloaded objects
Memory leaks during accessing ptoperies/elements of overloaded objects were fixed
2003-12-15 07:22:09 +00:00
Zeev Suraski
3a42babad6
Fix behavior of return-by-reference functions. Remove erroneous warnings,
...
add E_STRICT warnings in case you return something by reference that you're
not supposed to (anything that's not a variable, or a return-value of a
function that returned by reference).
2003-12-14 16:09:07 +00:00
Zeev Suraski
e94e3e1775
Some cleanup
2003-12-14 12:32:02 +00:00
Andi Gutmans
5ba810ee46
- Refix bug #24773
2003-12-11 10:21:16 +00:00
Marcus Boerger
b8afd8343a
read_dimension() handler might return 0, handle this.
2003-12-11 09:52:33 +00:00
Andi Gutmans
f4d6a5c7cf
- Remove two unneeded convert_to_string() (found by Marcus)
...
- Change illegal use of string offset to E_ERROR
2003-12-05 16:28:54 +00:00
Moriyoshi Koizumi
4a38020ddd
Revert crap.
2003-12-04 17:38:21 +00:00
Moriyoshi Koizumi
bcbc036ac1
Raise error in case dereference is performed on a scalar value.
2003-12-04 13:38:30 +00:00
Moriyoshi Koizumi
5fe26e76eb
This kind of error should be caught. (suggested by Andi, thanks)
2003-12-03 22:08:58 +00:00
Moriyoshi Koizumi
7ac854e710
Fix bug #24773 (unset()ing string offsets crashes PHP)
2003-12-03 19:10:38 +00:00
Derick Rethans
611219208c
- Remove newline from error message
2003-12-03 15:01:04 +00:00
Andi Gutmans
98e1a3dbcb
- Change to E_STRICT so as not to break existing scripts.
...
- Thanks Edin
2003-12-01 12:35:46 +00:00
Ilia Alshanetsky
cf196ac625
Restore original patch for bug #26281 .
...
# Andi if you have a time & interest please see if perhaps a better
# solution can be implemented. Thanks.
2003-11-29 17:33:25 +00:00
Marcus Boerger
4dba05d9cc
Add new interface ArrayAccess to use objects as Arrays
2003-11-24 20:57:54 +00:00
Andi Gutmans
d344648b07
- Fix __autoload() to preserve class case.
...
- Heads up, this patch might break stuff so please let me know if you
- bump into any problems.
2003-11-24 18:13:29 +00:00
Ilia Alshanetsky
44a03df926
Cleaner patch for bug #26281 .
2003-11-21 04:45:43 +00:00
Ilia Alshanetsky
fdd902f0dd
Possible fix for bug #26281 & test case.
2003-11-19 00:41:14 +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
5112a4ae24
Update Iterators: Call next at the correct point in time.
2003-11-07 10:47:47 +00:00
Marcus Boerger
f9d13098e7
Prevent some SEGV's when Exceptions are thorown inside iterators.
2003-11-04 22:07:59 +00:00
Marcus Boerger
3c62b3b5ac
Expand Interface C API.
...
In short: zend_class_entry->interface_gets_implemented() allows to modify
the class entry of a class when an interface gets implemented.
2003-10-22 19:59:58 +00:00
Marcus Boerger
25aa8b715e
Added c-api for iterators
...
# After 4 Month work and endless discussions...
2003-10-17 17:19:44 +00:00
Zeev Suraski
2ab30d7133
Allow foo::$bar()
2003-10-09 13:44:44 +00:00
Zeev Suraski
146ba0e875
Fix bug #17997 (Warning when switch & reference are combined)
2003-10-07 16:04:08 +00:00
Zeev Suraski
3f5acc73a5
Remove redundant callback, simplify API
2003-10-05 07:52:28 +00:00
Marcus Boerger
909bd62a43
Show name of missing function as typed
2003-09-17 11:06:11 +00:00
Marcus Boerger
6bf04aff5b
Revert - need to look for a better solution
2003-09-15 21:00:38 +00:00
Marcus Boerger
16a816b92c
Bugfix #25547
2003-09-15 20:20:14 +00:00
Marcus Boerger
cdc5d69ec2
Fix foreach() called with non array
2003-09-07 23:09:30 +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
fb4a63a07d
Synch error message with other one to fix tests
2003-08-31 11:38:31 +00:00
Marcus Boerger
f1c92fa4c5
- Calling abstract methods should be a error for consistency reason.
...
- So in reflection_api we use the reflection_exception again.
2003-08-30 23:51:42 +00:00
Marcus Boerger
f7f49e4584
- The compiler can't detect all abstract function calls so we need to check.
...
# In this case throwing a dedicated exception is better than the error we
# show when the compiler can detect the abstract call because its run-time.
2003-08-30 11:40:37 +00:00
Sascha Schumann
2e36578cfd
Add format attribute to a number of functions
...
Kill a few warnings
2003-08-28 16:41:20 +00:00
Zeev Suraski
0ac5bbd780
Never, ever, overwrite the refcount element of a connected zval!
2003-08-24 15:59:19 +00:00
Marcus Boerger
fbda310a41
- Flag ctor/dtor methods
...
- Use this to prevent memleaks when an exception gets thrown in ctors.
# I added the dtor flags for consistency, atm a compareable check in
# isn't necessary for destruction. But anyway i'll use this for the
# Relection API too.
2003-08-23 15:38:58 +00:00
Wez Furlong
1a40feb965
fix build
2003-08-19 01:15:47 +00:00
Zeev Suraski
6ab9c1a336
Prevent access to internal engine functionality
2003-08-18 23:11:58 +00:00
Zeev Suraski
49c4866a47
- Improve tracking
...
- Fix several overloading issues
2003-08-18 22:31:11 +00:00
Marcus Boerger
717b5afe1d
Fix warnings
2003-08-17 18:56:54 +00:00
Marcus Boerger
6dbc0bdc35
Remove unnecessary if
2003-08-17 12:38:27 +00:00
Marcus Boerger
1e17ebe047
Put the code where it belongs - fixes a warning and confusion
2003-08-17 12:27:33 +00:00
Marcus Boerger
9c68f33b51
Implement a TBD: JMP to the end of foreach
2003-08-17 12:17:34 +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
Marcus Boerger
de32c1de56
Fix ZTS
2003-08-04 19:57:53 +00:00
Stanislav Malyshev
a3dc90d8d0
use get_obj_zval_ptr
2003-08-04 10:30:42 +00:00
Stanislav Malyshev
4d51526350
Fix #24884 - clone $this
2003-08-04 09:10:52 +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
8b4bd4a8ec
Clean up. extended_value can only contain either ZEND_UNSET_DIM or
...
ZEND_UNSET_OBJ.
2003-08-03 08:23:25 +00:00
Zeev Suraski
9d7122fb53
Generalize fetch_class
2003-08-03 08:21:08 +00:00
Marcus Boerger
4fa6eac1f8
Fix warning
2003-08-02 11:39:15 +00:00
Zeev Suraski
accd6b623b
Finish the array overloading patch
2003-07-31 09:06:11 +00:00
Zeev Suraski
d95a6916de
Cleanup
2003-07-31 08:24:55 +00:00
Andi Gutmans
8264eedc48
- Fix problem with hash when updating same bucket with data of different
...
sizes one after another.
- Fix number of arguments to read_dimension.
2003-07-30 19:47:39 +00:00
Zeev Suraski
68fa4e50f8
Get rid of an opcode
2003-07-30 17:49:27 +00:00
Zeev Suraski
f41f62c2ff
Support overloading of $foo["bar"] += "baz"
2003-07-30 17:40:54 +00:00
Zeev Suraski
c0b46739ca
Improve array overloading - support unset($foo["bar"])
2003-07-30 17:12:06 +00:00
Stanislav Malyshev
1cc89effdb
clean the right one
2003-07-27 14:02:46 +00:00
Stanislav Malyshev
9fa2d52310
make clone and throw coexist peacefully
2003-07-27 13:20:31 +00:00
Stanislav Malyshev
c3c136ea4b
fix #24635 : clean hash before putting into cache
2003-07-27 12:46:14 +00:00
Zeev Suraski
b54ae17904
Fix logic and comments in ASSIGN_DIM
2003-07-24 16:51:35 +00:00
Zeev Suraski
0610515703
Fix assignments to numeric array indices
2003-07-24 12:56:05 +00:00
Zeev Suraski
03b6af07eb
Support references in foreach()
...
Syntax:
foreach ($arr as &$val)
foreach ($arr as $key => &$val)
2003-07-24 12:38:33 +00:00
Zeev Suraski
e25d5e7f7a
Fix binary safety in foreach() keys (fixes bug #24783 )
2003-07-24 08:36:39 +00:00
Stanislav Malyshev
237116aa27
Remove namespace leftovers
2003-07-23 08:58:46 +00:00
Zeev Suraski
cf90932a05
Improve infrastructure of numeric handling of elements in symbol tables.
...
When you want to work with a symbol table, and you don't know whether you
have a numeric ("string that looks like a number") or a string element in
your hands, use zend_symtable_*() functions, in place of zend_hash_*()
functions.
2003-07-22 16:06:07 +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
754529920d
Revert fix for #24729 , and refix
2003-07-21 07:42:15 +00:00
Marcus Boerger
98963e3c75
Go with a better fix for #24729
2003-07-21 07:13:26 +00:00
Marcus Boerger
8ac334289a
Bugfix #24729 = new ; causes crash when is not set
2003-07-20 20:45:59 +00:00
Marcus Boerger
7bbe6080f2
Fix uncloneable objetcs
2003-07-20 17:46:21 +00:00
Zeev Suraski
3a898f6d4e
More cleanup for assign-op handling of objects
2003-07-16 08:57:08 +00:00
Zeev Suraski
d9fb6b672a
initial refactoring for assign-op handling of objects
2003-07-08 11:52:21 +00:00
Zeev Suraski
3cfa6a68f4
Add get_dim callback
2003-07-07 10:53:27 +00:00
Zeev Suraski
ed97b9fb6e
Fix naming convention
2003-07-07 10:47:25 +00:00
Derick Rethans
d16f0a6333
- Help Zeev fixing ghosts :)
2003-07-07 10:16:05 +00:00
Zeev Suraski
938c0fbc19
Initial support for overloading of array syntax for objects (very initial)
2003-07-07 09:00:36 +00:00
Stanislav Malyshev
8f0234160a
enable Classname() constructor to be called via parent::__constructor()
2003-07-03 12:03:11 +00:00
Zeev Suraski
eb224d4a5f
Throughly fix scoping change. Fixes, among other things, bug #24403
2003-07-02 17:48:18 +00:00