|
@@ -160,17 +160,19 @@ class TripalJob {
|
|
}
|
|
}
|
|
|
|
|
|
$includes = $details['includes'];
|
|
$includes = $details['includes'];
|
|
- foreach ($includes as $path) {
|
|
|
|
- $full_path = $_SERVER['DOCUMENT_ROOT'] . base_path() . $path;
|
|
|
|
- if (!empty($path)) {
|
|
|
|
- if (file_exists($path)) {
|
|
|
|
- require_once($path);
|
|
|
|
- }
|
|
|
|
- elseif (file_exists($full_path)) {
|
|
|
|
- require_once($path);
|
|
|
|
- }
|
|
|
|
- elseif (!empty($path)) {
|
|
|
|
- throw new Exception("Included files for Tripal Job must exist. This path ($full_path) doesn't exist.");
|
|
|
|
|
|
+ if ($path and is_array($path)) {
|
|
|
|
+ foreach ($includes as $path) {
|
|
|
|
+ $full_path = $_SERVER['DOCUMENT_ROOT'] . base_path() . $path;
|
|
|
|
+ if (!empty($path)) {
|
|
|
|
+ if (file_exists($path)) {
|
|
|
|
+ require_once($path);
|
|
|
|
+ }
|
|
|
|
+ elseif (file_exists($full_path)) {
|
|
|
|
+ require_once($path);
|
|
|
|
+ }
|
|
|
|
+ elseif (!empty($path)) {
|
|
|
|
+ throw new Exception("Included files for Tripal Job must exist. This path ($full_path) doesn't exist.");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|