ID:               41948
 User updated by:  zolv at t-k dot pl
 Reported By:      zolv at t-k dot pl
-Status:           Bogus
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: x86_64-2.6.19-gentoo-r4
 PHP Version:      5.2.2
 New Comment:

thx for quick reply.


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

[2007-07-10 10:22:10] [EMAIL PROTECTED]

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

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

[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