From 508de7dd3bc31142c4e3689ac2a74077f997e4fa Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 3 Apr 2016 17:03:42 -0500 Subject: [PATCH] Composer autoload conditional --- functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 6d43a4c068..c5d787f136 100644 --- a/functions.php +++ b/functions.php @@ -49,6 +49,8 @@ unset($file, $filepath); /** - * Require composer autoloader + * Require Composer autoloader if installed on it's own */ -require_once __DIR__ . '/vendor/autoload.php'; +if (file_exists($composer = __DIR__ . '/vendor/autoload.php')) { + require_once $composer; +}