Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13989279
D14523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
881 B
Referenced Files
None
Subscribers
None
D14523.diff
View Options
diff --git a/src/__phutil_library_init__.php b/src/__phutil_library_init__.php
--- a/src/__phutil_library_init__.php
+++ b/src/__phutil_library_init__.php
@@ -32,6 +32,26 @@
'phutil'));
}
} catch (PhutilMissingSymbolException $ex) {
+ $should_throw = true;
+
+ foreach (debug_backtrace() as $backtrace) {
+ if (empty($backtrace['function'])) {
+ continue;
+ }
+
+ switch ($backtrace['function']) {
+ case 'class_exists':
+ case 'interface_exists':
+ case 'trait_exists':
+ $should_throw = false;
+ break;
+ }
+ }
+
+ if (!$should_throw) {
+ return false;
+ }
+
// If there are other SPL autoloaders installed, we need to give them a
// chance to load the class. Throw the exception if we're the last
// autoloader; if not, swallow it and let them take a shot.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 22, 7:27 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6727543
Default Alt Text
D14523.diff (881 B)
Attached To
Mode
D14523: Don't throw `PhutilMissingSymbolException` from `class_exists` or `interface_exists`
Attached
Detach File
Event Timeline
Log In to Comment