|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74475 require() REALLY should throw exceptions
Submitted: 2017-04-19 18:54 UTC Modified: 2020-06-05 07:47 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 7.1.5RC1 OS: Irrelevant
Private report: No CVE-ID: None
 [2017-04-19 18:54 UTC] spam2 at rhsoft dot net
this is REALLY a problem when you have a handler for 3rd party modules where you can't say "uhm please use include()" when your whole application get stopped instead procude a pretty page with navigation and a clear error message

the same problem with:

PLEASE - fix all that "Fatal error" stuff and make it catchable

Warning: require(non-existing): failed to open stream: No such file or directory in /mnt/data/downloads/test.php on line 4

Fatal error: require(): Failed opening required 'non-existing' (include_path='.:/Volumes/dune/www-servers/phpincludes:/usr/share/pear:/usr/share/php') in /mnt/data/downloads/test.php on line 4

Test script:
 catch(Throwable $exception)
  echo $exception;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-12 00:50 UTC]
-Type: Bug +Type: Feature/Change Request
 [2020-06-05 07:47 UTC]
-Status: Open +Status: Duplicate
 [2020-06-05 07:47 UTC]
Duplicate of bug #72089, fixed in PHP 8.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 14:01:28 2023 UTC