Bug #69929 [Opn->Nab]: EngineExceptions broken in alpha 2

From: Date: Thu, 25 Jun 2015 08:39:31 +0000
Subject: Bug #69929 [Opn->Nab]: EngineExceptions broken in alpha 2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193871@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69929&edit=1 ID: 69929 Updated by: laruence@php.net Reported by: cameron dot adam+php at gmail dot com Summary: EngineExceptions broken in alpha 2 -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Windows 7 64-bit PHP Version: 7.0.0alpha1 Block user comment: N Private report: N New Comment: sorry for that, but we changed the exception inheritance recently ,please read the " Changes to error handling" section in: https://github.com/php/php-src/blob/master/UPGRADING Previous Comments: ------------------------------------------------------------------------ [2015-06-25 08:16:23] cameron dot adam+php at gmail dot com Description: ------------ See code. On alpha 1 this returns "EngineException caught". On alpha 2 it returns: Fatal error: Uncaught TypeError: Argument 1 passed to takesInt() must be of the type integer, string given I suspect it's something to do with the new Throwable support, at a guess. This is the first bug I've raised, so lemme know if I've done it wrong,or you need more info. Cheers. Test script: --------------- try { function takesInt(int $x){ return true; } takesInt('not an int'); } catch(EngineException $e) { echo 'EngineException caught<br>'; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69929&edit=1

« previous php.bugs (#193871) next »