Page MenuHomePhabricator

D14523.diff
No OneTemporary

D14523.diff

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

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)

Event Timeline