-
Notifications
You must be signed in to change notification settings - Fork 5
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
Date comparison datatype issue results in error #23
Comments
I did some additional debugging and just submitted a forked pull request that should fix the problem: #24 |
Before merging the PR I'd like to be able to replicate it as I've not seen this happen in any environment before. I've done a clean install but runs for me. What is special about your environment that is causing this issue to occur? Can you reproduce it in a repo? I've set up a new site, with L10, Eloquent driver, but can't replicate this issue. While the PR does fix it, I'd also like to understand what is causing the issue too. |
That's so unbelievably bizarre...I tried in a different environment (3 different environments now) with the exact same dataset, but I can't replicate the issue. I'm thinking it may be related to some separate server configuration setting on that one environment. |
Just to be clear too, I’m not discounting the issue either: just want to understand why it’s happening. Can you dig a little deeper with a fresh install on the same environment to find the right steps to replicate? |
Bug description
When I use this plugin on my staging environment, I get the following fatal error:
Object of class Illuminate\\Support\\Carbon could not be converted to int
which is triggered at:
vendor/mitydigital/sitemapamic/src/Support/Sitemapamic.php:303
Steps to reproduce
Install the plugin on a site running Statamic v5.20.0 and load the
sitemap.xml
URL from any web browser.Environment and versions
Additional details
To test the issue, I inserted a
dd($entryLastMod, $lastMod);
at line 301 of thevendor/mitydigital/sitemapamic/src/Support/Sitemapamic.php
file. When I do so, the$entryLastMod
variable is presented as an int but the$lastMod
is set as a Carbon object.The text was updated successfully, but these errors were encountered: