Browse Source

Fixed bug in job view

spficklin 14 years ago
parent
commit
bb02d4f0f6
1 changed files with 7 additions and 3 deletions
  1. 7 3
      tripal_core/jobs.php

+ 7 - 3
tripal_core/jobs.php

@@ -268,9 +268,13 @@ function tripal_core_preprocess_tripal_core_job_view (&$variables){
    // arguments as they are
    $args = preg_split("/::/",$job->arguments);
    $arg_hook = $job->modulename."_job_describe_args";
-   $new_args = call_user_func_array($arg_hook,array($job->callback,$args));
-   if(is_array($new_args) and count($new_args)){
-      $job->arguments = $new_args;
+   if(is_callable($arg_hook)){
+      $new_args = call_user_func_array($arg_hook,array($job->callback,$args));
+      if(is_array($new_args) and count($new_args)){
+         $job->arguments = $new_args;
+      } else {
+         $job->arguments = $args;
+      }
    } else {
       $job->arguments = $args;
    }