Menu

#2971 timeline_ctrl 123 syntax error

v4.3.1
closed-fixed
None
5
2022-06-05
2022-06-04
No

SVN 7348 with PHP 7.4.28-1+deb11u1

After calling /timeline.php?ged=myged.ged&pids[]=Innnn I get:
Parse error: syntax error, unexpected ';' in /path/includes/controllers/timeline_ctrl.php on line 123
Line looks quite correct, I tried to look in files containing MinDate() function under /includes/ but can't find anything wrong in class_date.php...
Where does this error get into this place?

1 Attachments

Discussion

  • Gerry Kroll

    Gerry Kroll - 2022-06-04

    Try replacing line 122 of /includes/controllers/timeline_ctrl.php with the following:

    if (is_object($date)) {

     
  • Gerry Kroll

    Gerry Kroll - 2022-06-04
    • status: open --> closed-fixed
    • assigned_to: Gerry Kroll
     
  • Gerry Kroll

    Gerry Kroll - 2022-06-04

    fixed in SVN 7349

     
  • Krzysztof Jastrzębski

    It was the first thing I tried because saw unclosed parentheses but the problem is probably elsewhere because after this correction I get:
    Fatal error: Uncaught Error: Call to a member function convert_to_cal() on null in /var/www/phpGedView/includes/controllers/timeline_ctrl.php:124 Stack trace: #0 /var/www/phpGedView/timeline.php(36): TimelineControllerRoot->init() #1 {main} thrown in /var/www/phpGedView/includes/controllers/timeline_ctrl.php on line 124

     
  • Krzysztof Jastrzębski

    P.S. My data comes from ged produced by Gramps (and imported after making changes).
    Don't know what values PGV stores in case of incomplete dates knowledge but mine is:
    select count() from pgvdates where dgid = 'I0006' and dmonth = '';
    =17 (and these are emptystr not NULLs)
    But don't know if it matters...

     
  • Gerry Kroll

    Gerry Kroll - 2022-06-05
    • status: closed-fixed --> open
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +timeline_ctrl.php (13.2 kB; application/octet-stream)
    
     
  • Gerry Kroll

    Gerry Kroll - 2022-06-05

    Try the attached file to replace /includes/controllers/timeline_ctrl.php .

    The problem is caused by "improvements" to PHP 7.4.

     
    • Krzysztof Jastrzębski

      works like a charm - BIG thx

       
  • Gerry Kroll

    Gerry Kroll - 2022-06-05
    • status: open --> closed-fixed
     
  • Gerry Kroll

    Gerry Kroll - 2022-06-05

    Fixed once and for all in SVN 7350.

     

Log in to post a comment.