Page MenuHomePhabricator

D14523.id35315.diff
No OneTemporary

D14523.id35315.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,25 @@
'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':
+ $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
Fri, Oct 25, 1:38 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748741
Default Alt Text
D14523.id35315.diff (851 B)

Event Timeline