Syntax error: unexpected end of file in layout/secure.php
Students attempting to write a quiz ran into a syntax error, on line 64 of layout/secure.php (Adaptable version 2018112300, Moodle 3.5.3), when viewing /mod/quiz/attempt.php. Exact error:
Default exception handler: Exception - syntax error, unexpected end of file, expecting ',' or ';' Debug: Error code: generalexceptionmessage * line 64 of /theme/adaptable/layout/secure.php: ParseError thrown
Looking at that file, it appears that a php block isn't closed correctly (and a semi-colon is missing):
<script type="text/javascript">
<?php echo $PAGE->theme->settings->jssection;?>
</script>
<?php echo $OUTPUT->standard_end_of_body_html()
I compared it to an earlier version of that file and other code has changed so I'm not sure if there are additional lines missing, or if the unterminated block is the only issue.
```
Comments (7)
-
-
reporter - edited description
-
reporter - marked as minor
-
Thanks for reporting.
The right code must be:
<?php echo $OUTPUT->standard_end_of_body_html();
We'll publish a new release soon for moodle 3.6 and it will be fixed for 3.5 too
-
Issue
#962was marked as a duplicate of this issue. -
Issue
#965was marked as a duplicate of this issue. -
- changed status to resolved
fix
#959add comma at the end of the file→ <<cset ca767fb08179>>
- Log in to comment
I am having the same issue, i added a ; to the "echo $OUTPUT->standard_end_of_body_html()" statement and so far that appears to have fixed the issue for me running PHP 7.2