timeclock icon indicating copy to clipboard operation
timeclock copied to clipboard

Php error

Open rjonesbsink opened this issue 8 years ago • 2 comments

first error is

Notice: Use of undefined constant print_header - assumed 'print_header' in C:\xampp\htdocs\time2\punchclock\lib.timecard.php on line 164

Notice: Use of undefined constant print_row - assumed 'print_row' in C:\xampp\htdocs\time2\punchclock\lib.timecard.php on line 164

Notice: Use of undefined constant print_footer - assumed 'print_footer' in C:\xampp\htdocs\time2\punchclock\lib.timecard.php on line 164

then if I try to edit and fix I get this error when I refresh the page

Parse error: syntax error, unexpected end of file in your code on line 174?>

•PHP Syntax Check: Errors parsing your code

?>

rjonesbsink avatar Aug 13 '16 01:08 rjonesbsink

Then undo changes then the first error appears

rjonesbsink avatar Aug 13 '16 01:08 rjonesbsink

lib.timecard.php had a LOT when passing functions as parameters, they were in the php 4.x style rather than the 5.x style where they needed to be quoted. Check the fork at boatright/timeclock for a php 5.5 compliant version or you can just quote all the passed functions in the code.

So, the fix for that line is list($row_count, $total_hours, $overtime_hours, $today_hours) = $tc->walk('print_header', 'print_row', 'print_footer');

see the fork at boatright/timeclock for a php 5.5 compliant version.

BoatrightTBC avatar Jan 26 '17 00:01 BoatrightTBC