Edit report at https://bugs.php.net/bug.php?id=61778&edit=1

 ID:                 61778
 User updated by:    james dot thomsen at gmail dot com
 Reported by:        james dot thomsen at gmail dot com
 Summary:            Crash when overloaded method called from class
                     constructor
 Status:             Open
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Windows 2003
 PHP Version:        5.4.0
 Block user comment: N
 Private report:     N

 New Comment:

Yes, it crashes at the command line too.  The windows event logs record the 
crash.


Event Type:     Error
Event Source:   Application Error
Event Category: (100)
Event ID:       1000
Date:           4/19/2012
Time:           1:40:27 PM
User:           N/A
Computer:       SPWEB01
Description:
Faulting application php-cgi.exe, version 5.4.0.0, faulting module php5.dll, 
version 5.4.0.0, fault address 0x002f8b80.

For more information, see Help and Support Center at 
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 70 68 70   ure  php
0018: 2d 63 67 69 2e 65 78 65   -cgi.exe
0020: 20 35 2e 34 2e 30 2e 30    5.4.0.0
0028: 20 69 6e 20 70 68 70 35    in php5
0030: 2e 64 6c 6c 20 35 2e 34   .dll 5.4
0038: 2e 30 2e 30 20 61 74 20   .0.0 at 
0040: 6f 66 66 73 65 74 20 30   offset 0
0048: 30 32 66 38 62 38 30      02f8b80


Previous Comments:
------------------------------------------------------------------------
[2012-04-20 00:19:44] ni...@php.net

This script runs fine on CLI for me. Could you see whether running on CLI works 
for you?

------------------------------------------------------------------------
[2012-04-19 20:20:31] james dot thomsen at gmail dot com

Description:
------------
If a class overrides a method but with a different signature and that method is 
called in the constructor and if error_reporting is set to display strict 
errors and if the classes are defined in reverse order, PHP will crash.  In my 
test script, if class one is defined before class two, PHP won't crash.  I 
realize that overridden methods need to have identical signatures, but I would 
expect a warning and not a crash.

Test script:
---------------
error_reporting(-1);
class two extends one{
    public function __construct(){
        $this->error(7);
    }
    private function error($n){
        echo 'two';
    }
}
class one{
    private function error(){
        echo 'one';
    }
}
new two;

Expected result:
----------------
two

Actual result:
--------------
FastCGI Error
The FastCGI Handler was unable to process the request.

Error Details:

    The FastCGI process exited unexpectedly
    Error Number: -2147467259 (0x80004005).
    Error Description: Unspecified error

HTTP Error 500 - Server Error.
Internet Information Services (IIS)


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61778&edit=1

Reply via email to