|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-10 10:22 UTC] jani@php.net
[2007-07-10 10:37 UTC] zolv at t-k dot pl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
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