Commit Graph

3432 Commits

Author SHA1 Message Date
Stanislav Malyshev
99edaa3a4f oops, fix cut&paste gone bad 2004-03-04 13:09:03 +00:00
Stanislav Malyshev
f9c65203d2 Fix object true value: if we are in compat mode and it's Zend object -
use PHP4 rules. Otherwise, object is always true.
2004-03-04 13:06:02 +00:00
Derick Rethans
39ac9579f7 - Fixed a 64bit issue (for zend_builtin_functions.c, module_number is an int).
- Change the MAX_LENGTH_OF_LONG constant to 20, as LONG_MAX is 20 characters.
  (Patches by Ard Biesheuven)
2004-03-04 11:02:05 +00:00
Derick Rethans
f88b286888 - Added instance_of test (patch by Ard Biesheuvel) 2004-03-04 10:58:49 +00:00
Stanislav Malyshev
78a36b50a1 Disallow redefining ctors and cleanup 2004-03-04 10:02:59 +00:00
Stanislav Malyshev
9731d9f303 Handle out of memory/bad size situation gracefully, without getting into loop 2004-03-04 09:18:05 +00:00
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