-
Notifications
You must be signed in to change notification settings - Fork 42
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
ParseError syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) #109
Comments
@rhukster I still get this error on 5.0.0 Thanks for your help. |
I replaced grav-plugin-sitemap/classes/SitemapEntry.php Lines 17 to 20 in 8b8a402
with public $timestamp;
public $rawroute;
public $longdate;
public $shortdate; And now it seems to work. Did some Googling, found out that the type hints you're using require PHP 7.4 but Grav only requires PHP 7.3.6. |
After one or two years of having the sitemap work flawlessly, it started crashing. I suspect it may be because of the 4.0.0 update.
The error I get is a ParseError as the title of this issue indicates.
It points at this line:
https://github.com/getgrav/grav-plugin-sitemap/blame/8b8a402c238cace69254445863c5541b30fe0a23/classes/SitemapEntry.php#L17
The error reads “syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)” and the stack frames are shown below.
What else can I provide?
Stack frames
The text was updated successfully, but these errors were encountered: