#32658 [NEW]: Exceptions in includes from a method are invisible
| From: | LoN_Kamikaze at gmx dot de | Date: | Sun, 10 Apr 2005 16:57:43 +0000 |
| Subject: | #32658 [NEW]: Exceptions in includes from a method are invisible | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-76594@lists.php.net to get a copy of this message | ||
From: LoN_Kamikaze at gmx dot de
Operating system: WinXP
PHP version: 5.0.4
PHP Bug Type: Output Control
Bug description: Exceptions in includes from a method are invisible
Description:
------------
If you throw an exception in a script that has been called via include in
a method, it terminates the script, but it does not show an error message
and it is not loged in the php error logfile.
I suspect this bug is related to another one I submited:
http://bugs.php.net/bug.php?id=32657
But I am not sure, thus I submited it as a new bug.
Reproduce code:
---------------
index.php
<?php
class testReturn {
public function test() {
include('test.php');
echo 'Nothing unusual happened in this inlcude';
}
}
$test = new testReturn();
$test->test();
?>
test.php
<?php
throw new Exception('I wish that would work');
?>
Expected result:
----------------
Fatal error: Uncaught exception 'Exception' with message 'I wish that
would work' in...
--
Edit bug report at http://bugs.php.net/?id=32658&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32658&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32658&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32658&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32658&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32658&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32658&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32658&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32658&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32658&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32658&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32658&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32658&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32658&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32658&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32658&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32658&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32658&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32658&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32658&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32658&r=mysqlcfg