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