Skip to content

Commit

Permalink
support null useragent in ImageProviderFactory and in RegionPositionC…
Browse files Browse the repository at this point in the history
…ompensationFactory
  • Loading branch information
itaibh committed Jan 21, 2018
1 parent 5367c7b commit aaab58b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eyes.selenium.php/capture/ImageProviderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ImageProviderFactory
* @param EyesWebDriver $driver
* @return ImageProvider
*/
public static function getImageProvider(UserAgent $ua, Eyes $eyes, Logger $logger, EyesWebDriver $driver)
public static function getImageProvider(UserAgent $ua = null, Eyes $eyes, Logger $logger, EyesWebDriver $driver)
{
if ($ua != null) {
if ($ua->getBrowser() == BrowserNames::Firefox) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RegionPositionCompensationFactory
* @param Logger $logger
* @return IRegionPositionCompensation
*/
public static function getRegionPositionCompensation(UserAgent $userAgent, Eyes $eyes, Logger $logger)
public static function getRegionPositionCompensation(UserAgent $userAgent = null, Eyes $eyes, Logger $logger)
{
if ($userAgent != null) {
if ($userAgent->getBrowser() == BrowserNames::Firefox) {
Expand Down

0 comments on commit aaab58b

Please sign in to comment.