Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Php error #36

Open
rjonesbsink opened this issue Aug 13, 2016 · 2 comments
Open

Php error #36

rjonesbsink opened this issue Aug 13, 2016 · 2 comments

Comments

@rjonesbsink
Copy link

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
Copy link
Author

Then undo changes then the first error appears

@BoatrightTBC
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants