Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15393936
D19001.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19001.id.diff
View Options
diff --git a/src/moduleutils/PhutilBootloader.php b/src/moduleutils/PhutilBootloader.php
--- a/src/moduleutils/PhutilBootloader.php
+++ b/src/moduleutils/PhutilBootloader.php
@@ -215,7 +215,7 @@
private function executeInclude($path) {
// Include the source using `include_once`, but convert any warnings or
- // errors into exceptions.
+ // recoverable errors into exceptions.
// Some messages, including "Declaration of X should be compatible with Y",
// do not cause `include_once` to return an error code. Use
@@ -230,12 +230,18 @@
// but the function does not exist in earlier versions of PHP. Instead,
// check if the value has changed.
+ // Some parser-like errors, including "class must implement all abstract
+ // methods", cause PHP to fatal immediately with an E_ERROR. In these
+ // cases, include_once() does not throw and never returns. We leave
+ // reporting enabled for these errors since we don't have a way to do
+ // anything more graceful.
+
// See also T12190.
$old_last = error_get_last();
try {
- $old = error_reporting(0);
+ $old = error_reporting(E_ERROR);
$okay = include_once $path;
error_reporting($old);
} catch (Exception $ex) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 11:17 PM (5 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7280402
Default Alt Text
D19001.id.diff (1 KB)
Attached To
Mode
D19001: Improve PHP7 handling of include-time parser-like fatals like "class must implement all abstract methods"
Attached
Detach File
Event Timeline
Log In to Comment