Commit Graph

3476 Commits

Author SHA1 Message Date
62670bd1af ChangeLog update 2004-03-04 01:36:39 +00:00
Andi Gutmans
1c180ba3e8 - Fix crash:
<?
class foo {
        function __destruct() {
                foreach ($this->x as $x);
        }
}
new foo();
echo 'OK';
?>
2004-03-03 09:58:58 +00:00
ef39d84bbb ChangeLog update 2004-03-03 01:33:18 +00:00
Marcus Boerger
8d45fece42 Fix zend_parse_method_parameters_ex() and make it consistant with
zend_parse_method_parameters().
# Obviously its only place of use is in pdo just right now.
2004-03-02 16:17:58 +00:00
Andi Gutmans
41b7211539 - Fix leaks (although there might be still a problem here). 2004-03-02 11:03:48 +00:00
Andi Gutmans
7c9694d26e - Fix leak (Dmitry) 2004-03-02 10:13:43 +00:00
Andi Gutmans
576e16b03f - Fix crash in:
<?php
  class Foo {
    public $attributes=  array();

    function export() {
      foreach ($this->attributes as $name => $attr) {
      }
    }
  }

  $f= new Foo();
  $f->export();
?>
2004-03-02 08:28:12 +00:00
Andi Gutmans
3333380bf0 - Improve fix for protecting destructor's from exceptions.
- I was killing the current exception completely which was wrong.
2004-03-02 08:13:15 +00:00
ee768a2fe6 ChangeLog update 2004-03-02 01:31:41 +00:00
Andi Gutmans
8912a50bf4 - Fix crash in destructors(). You can't throw an exception in destructors
as there is no guaranteed time when the destructor will be called.
2004-03-01 19:45:07 +00:00
Andi Gutmans
161ed69721 - Fix leak 2004-03-01 17:43:57 +00:00
Andi Gutmans
0f1382e126 - Fix crash in reflection API (pierre) 2004-03-01 15:19:38 +00:00
Andi Gutmans
7c72f6ff61 - Fix crash in exception handling (zend_exception_error(...) and
zend_eval_string_ex() were buggy (Dmitry, Andi)
2004-03-01 13:29:45 +00:00
Derick Rethans
afc35efcf6 - Typo fix (by Jan) 2004-03-01 12:25:03 +00:00
Derick Rethans
a84efbe923 - Fixed bug #27443 (defined() returns wrong type). 2004-03-01 08:07:25 +00:00
9cf988c201 ChangeLog update 2004-03-01 01:32:12 +00:00
Andi Gutmans
37ddf8e922 - Apply fixes by Timm. 2004-02-29 18:31:29 +00:00
Andi Gutmans
63e263f32a - Change prototype isA check not to check the constructor.
- Only give an E_STRICT for non-isA compliant code as opposed to
  E_COMPILE_ERROR.
2004-02-29 18:25:50 +00:00
Stanislav Malyshev
edb21137de add ZEND_API there too for opcode handlers 2004-02-29 16:01:21 +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
dc03dbc699 ChangeLog update 2004-02-28 01:32:09 +00:00
Marcus Boerger
7fdd68af8b Add some comments 2004-02-27 18:20:53 +00:00
Marcus Boerger
f449c8fdf7 Fixes for abstract classes/methods 2004-02-27 09:14:55 +00:00
44f0fce255 ChangeLog update 2004-02-27 01:32:32 +00:00
Marcus Boerger
059c533b4a Fix __METHOD__ (noticed by Davey Sahfik) 2004-02-26 19:59:49 +00:00
1085c6c7f1 ChangeLog update 2004-02-26 01:32:27 +00:00
Marcus Boerger
3e1f3b2124 Fix problem with Reflection_Property (patch from Timm slightly modified). 2004-02-26 01:06:18 +00:00
Marcus Boerger
ccef2cfb67 As Andi found out the dtor may increase the refcount. 2004-02-25 21:39:59 +00:00
foobar
b87a245207 ws + cs 2004-02-25 21:06:59 +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
Derick Rethans
9be67e5a42 - Use <span> instead of <font> in highlight_string(). (Patch by mg@iceni.pl) 2004-02-25 14:14:47 +00:00
foobar
c0885c93fe Improve error messages 2004-02-25 13:11:00 +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
Derick Rethans
ca64573e1b - Fixed bug #27391 (typo in Fatal Error message). 2004-02-25 10:43:36 +00:00
Zeev Suraski
36a751840d - Abstract methods cannot have defaults for arguments
- Make function foo($a, $b=null) satisfy both foo($a) and foo($a, $b)
  prototypes
2004-02-25 09:25:37 +00:00
Sebastian Bergmann
0cfb59fce4 Proto fixes. 2004-02-25 08:58:56 +00:00
Marcus Boerger
b0529e5485 Fix object destruction/free in shutdown
- set destructor_called even when no dtor is given
- use free_storage even when no dtor hat to be called
2004-02-25 08:16:54 +00:00
Marcus Boerger
98f725b0e0 Checking once for dtor is enough 2004-02-25 07:47:56 +00:00
da0c739eac ChangeLog update 2004-02-25 01:32:26 +00:00
Marcus Boerger
ce8f77f7b1 Fix class flags when handling abstract methods 2004-02-24 23:39:12 +00:00
409c06738f ChangeLog update 2004-02-24 01:32:27 +00:00
Andi Gutmans
4f05437e08 - Improve precendence:
<?php

$obj->foo = "Blah";

if (!$obj instanceof StdClass) {
    print "No";
} else {
    print "Yes";
}
2004-02-23 18:17:16 +00:00
Andi Gutmans
4a14e5c30d - Decrease precedence of instanceof so that the following is true:
php -r 'var_export((object)1 instanceof stdClass);';
Patch by Jan Lehnardt
2004-02-23 08:40:39 +00:00
0d28e63189 ChangeLog update 2004-02-23 01:32:39 +00:00
Derick Rethans
e2c9926923 - Fixed bug #27354 (Modulus operator crashes PHP). 2004-02-22 20:02:26 +00:00
Marcus Boerger
1fbe07c9e0 Add some more obviously needed information 2004-02-22 18:50:47 +00:00
60812423da ChangeLog update 2004-02-21 01:32:48 +00:00
Hartmut Holzgraefe
1727c6a2bb more EXTERN_C wrapping of ZEND_API prototypes 2004-02-20 08:03:27 +00:00
foobar
acf7a5e262 ws fix 2004-02-20 06:59:37 +00:00
b21569dead ChangeLog update 2004-02-19 01:32:24 +00:00
Hartmut Holzgraefe
3a3f95a399 wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
for C++ extension support
2004-02-18 22:44:40 +00:00
Zeev Suraski
666b44c11e Forward-port fixlet from PHP 4 (thanks to Michael Sisolak) 2004-02-18 08:53:56 +00:00
7cb2086ea1 ChangeLog update 2004-02-18 01:32:10 +00:00
foobar
2b8611ae3b MFB: - Fix bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings) 2004-02-17 22:04:05 +00:00
9551966c85 ChangeLog update 2004-02-17 01:32:28 +00:00
Derick Rethans
5dcf37b618 - Clearify clone behavior, fixed clone example (Patch by Jan Lehnardt) 2004-02-16 12:08:20 +00:00
Marcus Boerger
b0ef896f0e Bugfix #27227 Mixed case class names causes Fatal Error in Constructor call 2004-02-16 00:34:23 +00:00
36315ded6b ChangeLog update 2004-02-15 01:33:34 +00:00
Marcus Boerger
ce984d7667 dtor's may not be called from free_storage handlers 2004-02-14 13:33:36 +00:00
7e7630aeb0 ChangeLog update 2004-02-13 01:32:15 +00:00
Andi Gutmans
5cad7a2b4a - Remove old code 2004-02-12 15:23:06 +00:00
Hartmut Holzgraefe
92f355d733 making sure that the provided examples actualy work (or at least do not
generate no parse errors) unless they are really expected to fail
2004-02-12 14:44:58 +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
Andi Gutmans
7d3215d333 - Add comments to read/write property/dimension for extension authors 2004-02-12 12:22:45 +00:00
Zeev Suraski
30171a7590 zend_default_classes.h -> zend_exceptions.h 2004-02-12 10:43:27 +00:00
Andi Gutmans
61a049ba3b - Add zend_exceptions.c 2004-02-12 10:39:12 +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
d9630a595b Exceptions updates:
- Enforce exceptions to be derived from class Exception.  This allows
  users to perform catch-all.  It's not yet complete, so don't get
  comfortable with it just yet :)  Updates are coming soon.
- Implement zend_throw_exception() using zend_throw_exception_ex()
2004-02-12 10:24:40 +00:00
Andi Gutmans
559b14611d - Add API function to throw exception by using an object 2004-02-12 09:50:08 +00:00
35e8577db4 ChangeLog update 2004-02-12 01:36:26 +00:00
Marcus Boerger
2a8426a664 Must be initialized in ZTS mode 2004-02-11 22:58:03 +00:00
Marcus Boerger
39894ea7c1 Update 2004-02-11 22:42:53 +00:00
Marcus Boerger
4256448a5f Update 2004-02-11 22:38:05 +00:00
Marcus Boerger
c6cbafa273 Fix: <interface> [extends <interface> [, <ineterface>]* ] 2004-02-11 22:13:39 +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
75390796be Fix bug #25038 2004-02-11 13:01:39 +00:00
Zeev Suraski
fde9bac476 Fix crash (patch by Rob Richards) 2004-02-11 12:35:24 +00:00
Zeev Suraski
6b6fe2f76e Fix exceptions thrown without a stack frame
Always enable set_exception_handler()
2004-02-11 12:31:18 +00:00
Zeev Suraski
3d622f99c1 Change FETCH_RESOURCE to return false on error instead of null, for
consistency with other error situations
2004-02-11 11:52:33 +00:00
Zeev Suraski
c01c44c2e2 Fix bug #26802 (the right aspects of it found by Marcus, anyway :) 2004-02-11 10:51:05 +00:00
Zeev Suraski
0f3106ad17 Fix and clarify the test case 2004-02-11 10:48:20 +00:00
Zeev Suraski
73a6bcf5cf Complete the fix for handling of exceptions happening during the
argument passing phase of function calls (fixes bug #26866)
2004-02-11 09:42:58 +00:00
Zeev Suraski
4b632eba46 whitespace 2004-02-11 09:42:10 +00:00
8d102800b3 ChangeLog update 2004-02-11 01:32:14 +00:00
Zeev Suraski
816d15252b Ignore the memleak in this test 2004-02-10 22:13:07 +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
b6e14b44b4 Fix bug #27186 2004-02-10 16:08:01 +00:00
Zeev Suraski
da36a7c249 Fix bug #26869 2004-02-10 15:30:32 +00:00
Zeev Suraski
57aaad0dec Fix refcounting of ++/+= overloading (fix leak in __get()/__set()
based classes)
2004-02-10 14:52:14 +00:00
Andi Gutmans
91ee6c0ceb - Nuke more unused code 2004-02-10 11:44:17 +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
Andi Gutmans
70c418d064 - We will go with PHP 4 behavior. With the new object model assigning by
reference has lost a lot of its importance.
2004-02-10 11:20:52 +00:00