alex-moreno / glitcherbot

Visual regression testing made easy. Automating the boring stuff
GNU Affero General Public License v3.0
15 stars 10 forks source link

PHP Errors and Warnings #59

Closed philipnorton42 closed 3 years ago

philipnorton42 commented 3 years ago

Describe the bug

There are a few notices and warnings being produced by the tool when in use. For example:

Notice: Undefined index: date1 in src/ScraperBot/Routing/Controllers/SitesController.php on line 84
Notice: Undefined index: date2 in src/ScraperBot/Routing/Controllers/SitesController.php on line 84
Notice: Undefined variable: persistNaughty in src/ScraperBot/Routing/Controllers/SitesController.php on line 84
Notice: Undefined variable: persistLatest in src/ScraperBot/Routing/Controllers/SitesController.php on line 84

To Reproduce

Errors are produced on most pages of the site, but also when using the command line interface.

Error also produced by a missing favicon.ico file.

Expected behavior

No errors should be produced during the normal use of the tool.

philipnorton42 commented 3 years ago

Added a PR for this that changes a few things in the codebase. All of the functionality is intact, I've just added some defaults to the variables being used so that they do not produce PHP warnings.

alex-moreno commented 3 years ago

lovely, thanks a lot @philipnorton42 💪 💪 ❤️

Merged