-
Notifications
You must be signed in to change notification settings - Fork 13
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 sureHtmlDiff::compareHTML is not passed null values #96
Make sureHtmlDiff::compareHTML is not passed null values #96
Conversation
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.
Hi,
Thank you for your contribution.
I notice you removed the template from the PR description - I've added it back. Please fill this in, as it makes it easier for us to review your PR.
Can you please fill in the full PR template? #96 (review) |
There are a couple of things to change which are pointed out in the checklist - in the interest of getting things moving along I'll point them out instead of asking you to go through the checklist again :p Please make changes accordingly:
|
89cbe69
to
22e3181
Compare
@alex-dna You've pulled through some commits from the |
22e3181
to
c10085c
Compare
@GuySartorelli Sorry about that, I've reset the commits. I'm not sure where the box to let you update the PR is, when I'll make sure I don't untick it inadvertently next time. |
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.
Looks good to me. Thanks for your patience!
Description
When a record is saved without a title or content, when viewing the RSS changes feed, a type error occurs.
Uncaught TypeError: SilverStripe\View\Parsers\HtmlDiff::compareHtml(): Argument #1 ($from) must be of type array|string, null given, called in /var/www/html/vendor/silverstripe/versionfeed/src/VersionFeed.php on line 110
Manual testing steps
I first encountered the issue with Elemental, after saving an element without a title.
But it should be the case for any page too (although it is less likely to save a page without title through the CMS).
Easiest way to reproduce is to temper with database if possible, set a page record version title or content to NULL, then visit the page URL/changes.
Issues
Pull request checklist