php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32658 Exceptions in includes from a method are invisible
Submitted: 2005-04-10 18:57 UTC Modified: 2005-04-11 09:38 UTC
From: LoN_Kamikaze at gmx dot de Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.0.4 OS: WinXP
Private report: No CVE-ID: None
 [2005-04-10 18:57 UTC] LoN_Kamikaze at gmx dot de
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...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-11 09:38 UTC] dmytton@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 22:01:31 2024 UTC