Menu

#2975 Research assistant (2 of 2) a non-numeric value encountered

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

for person i905 (so I can easily test/very) when I click on Research Assistant, I get a crash report


Research Assistant

ERROR 2: A non-numeric value encountered
0 Error occurred on line 1202 of file ra_functions.php in function determineClosest
1 called from line 1575 of file ra_functions.php in function tab
2 called from line 2034 of file individual_ctrl.php in function print_research_tab
3 called from line 1370 of file individual_ctrl.php in function getTab
4 called from line 580 of file individual.php
Warning: A non-numeric value encountered in /volume1/web/gen/modules/research_assistant/ra_functions.php on line 1202
ERROR 2: A non-numeric value encountered
0 Error occurred on line 1202 of file ra_functions.php in function determineClosest
1 called from line 1575 of file ra_functions.php in function tab
2 called from line 2034 of file individual_ctrl.php in function print_research_tab
3 called from line 1370 of file individual_ctrl.php in function getTab
4 called from line 580 of file individual.php
Warning: A non-numeric value encountered in /volume1/web/gen/modules/research_assistant/ra_functions.php on line 1202
<endcode></endcode>

Discussion

  • David Smart

    David Smart - 2022-06-24

    for this error, with a little instrumentation, I determined that
    $dateToCompare is null

     
  • Gerry Kroll

    Gerry Kroll - 2022-06-24
    • assigned_to: Gerry Kroll
     
  • Gerry Kroll

    Gerry Kroll - 2022-06-24

    The attachment to bug 2974 should fix this one too.

    <rant>
    Don't you just LOVE those "improvements" the PHP folks made to the language? They BROKE a lot of things in their eagerness to "modernize" the language. Obviously NEVER worked as real programmers or in a corporate support organization with real programmers.

    I would have been FIRED if I ever let that happen when I was working for a living.
    </rant>

     
  • David Smart

    David Smart - 2022-06-24

    Attachment from 2974 solved this too with a small mod -

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

    Thanks for the fast response - even to a feature you don't use!

     
  • 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.