Menu

#2974 Research assistant (1 of 2) convert_to_call() on null

v4.3.1
closed-fixed
None
5
2022-07-03
2022-06-24
David Smart
No

The research assistant tab crashed - in different ways.
For person I1 (which you don't have but will help be reproduce/test), I click on Research Assistant, and I get

Research Assistant
Fatal error: Uncaught Error: Call to a member function convert_to_cal() on null in /volume1/web/gen/modules/research_assistant/ra_functions.php:1311 Stack trace: #0 /volume1/web/gen/includes/controllers/individual_ctrl.php(2034): ra_functions->tab(Object(Person)) #1 /volume1/web/gen/includes/controllers/individual_ctrl.php(1370): IndividualControllerRoot->print_research_tab() #2 /volume1/web/gen/includes/controllers/individual_ctrl.php(254): IndividualControllerRoot->getTab(6) #3 /volume1/web/gen/individual.php(40): IndividualControllerRoot->init() #4 {main} thrown in /volume1/web/gen/modules/research_assistant/ra_functions.php on line 1311

Beneath this is the menu-set for Tasks, Missing Information, Auto Search, Comments, and the footer.

1 Attachments

Discussion

  • Gerry Kroll

    Gerry Kroll - 2022-06-24
    • assigned_to: Gerry Kroll
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +ra_functions.zip (17.0 kB; application/x-zip-compressed)
    
     
  • Gerry Kroll

    Gerry Kroll - 2022-06-24

    Are you REALLY using the Research Assistant module, or are you just playing around? I don't advise using the Research Assistant. It hasn't been properly verified and your results may vary. I'm not about to embark on a comprehensive bug chasing exercise, since this module is useless to me.

    Anyhow:
    Try the attached. Unzip and copy the resultant functions_ra.php file to the /modules/research_assistant directory.

     
  • David Smart

    David Smart - 2022-06-24

    I do use it from time to time as a convenient way to get to Ancestry and other sites with some context filled in.

    The attachment resulted in:

    Research Assistant
    Parse error: syntax error, unexpected '$dateToCompare' (T_VARIABLE) in /volume1/web/gen/modules/research_assistant/ra_functions.php on line 1200

    with line 1200 as "is_numeric" test on $dateToCompare


    function determineClosest(&$currentDate, $dateToCompare, $dateCompareAgainst )
    {
    if (!is_numeric($dateToCompare) $dateToCompare = 0;
    if (!is_numeric($dateCompareAgainst) $dateCompareAgainst = 0;

        if($dateCompareAgainst > $dateToCompare)
    

     
  • David Smart

    David Smart - 2022-06-24

    Oops sorry the quick update w/o due diligence on my part.

    Each "if" line needed one more closing ")" and after that they do not crash. Fixes both 2974 and 2975

     
  • Gerry Kroll

    Gerry Kroll - 2022-06-24

    David:
    You are correct. The trailing right-paren was missing in both IF statements. I need to be MUCH more diligent in submitting corrections, even if I don't use the feature.

    The attached corrects this all-too-frequent oversight.

     
  • Gerry Kroll

    Gerry Kroll - 2022-07-03
    • status: open --> closed-fixed
     
  • Gerry Kroll

    Gerry Kroll - 2022-07-03

    Fixed in SVN 7351

     

Log in to post a comment.