ID:               41948
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zolv at t-k dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: x86_64-2.6.19-gentoo-r4
 PHP Version:      5.2.3
 New Comment:

Of course not, it's not an exception but just plain and simple error.


Previous Comments:
------------------------------------------------------------------------

[2007-07-10 10:07:31] zolv at t-k dot pl

more info about my environment:
running on:

# php --version
PHP 5.2.2-pl1-gentoo (cli) (built: Jun 28 2007 10:11:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.0RC3, Copyright (c) 2002, 2003, 2004, 2005, 2006,
2007, by Derick Rethans

p.s.
sory, but there is no port for php 5.2.3 on gentoo jet

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

[2007-07-10 10:04:08] zolv at t-k dot pl

Description:
------------
    catch ( Exception $e) {
doesnt catch fatal error exception: 

PHP Catchable fatal error:  Argument 1 passed to
AaaCollection::setAaa() must be an instance of Aaa, instance of Bbb
given



Reproduce code:
---------------
<?

class Aaa { }

class Bbb { }

class AaaCollection {
    public function setAaa( Aaa $aaa  ) { }
}


$bbb    = new Bbb();
$aaaCol = new AaaCollection();

try {
    $aaaCol->setAaa( $bbb );
} catch ( Exception $e) {
    echo 'Exception has been catched';
}

Expected result:
----------------
exception should be catched



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


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

Reply via email to