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
Make sure Period::toString() handles case when child period returns array and add a unit test. #13762
Conversation
core/Period/Day.php
Outdated
public function __toString() | ||
{ | ||
return $this->toString(); | ||
return [$this->date->toString($format)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking this would eg break Search Engine Keywords...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
e2012bd
to
aca1997
Compare
For some reason I can't reproduce the notice... could you? I assume it is fine to merge. Not sure where/if we use |
It's reproducible in tests, I didn't try to reproduce through the UI, I think there must have been some error that occurs w/ a week or month period that might trigger it. Ie, something that actually triggers the |
some failing tests but otherwise good to merge 👍 |
@tsteur had to make a bunch of changes to the range period test and noticed that it might be possible for a plugin to use |
I don't think it is a BC concern but hard to say. But thinking about it again... a |
I think currently __toString() returns a string, and toString() returns an array of strings. Could try and change it to return a string, will have to see how much code uses it. |
All good, don't worry about it right now 👍 |
Feel free to merge if it fixes the problem. Only usage I could find was SearchEngine feature that used the day period and it doesn't seem to regress there. |
Fixes #13709