Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Fix "Resource temporarily unavailable" when cURL fails due to SSL ver… #1490

Closed
wants to merge 8 commits into from
Closed

Conversation

fatonsopa
Copy link

Fix "Resource temporarily unavailable" when cURL fails due to SSL verification

@jcqtc
Copy link

jcqtc commented May 28, 2018

Works well with me thanks! 👍 Just need an extra space line 91 so the build can pass without any error.

@fatonsopa
Copy link
Author

Hey @jcqtc, glad it helped you.
I'm not finding details about where the check is failing. Can you send me a URL or screenshot of where it is failing?

@jcqtc
Copy link

jcqtc commented May 28, 2018

Here's the link: https://travis-ci.org/fzaninotto/Faker/jobs/384760428.

At line 208 & 209 of the log (didn't see the second error):

--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
  91 | ERROR | Expected "} elseif (...) {\n"; found "} elseif(...) {\n"
 104 | ERROR | Expected "if (...) {\n"; found "if(...){\n"
--------------------------------------------------------------------------------

@fatonsopa
Copy link
Author

fatonsopa commented May 28, 2018

Thanks,
Just fixed that. However, the build is failing because of



LoremPixel is offline, skipping image download
/home/travis/build/fzaninotto/Faker/test/Faker/Provider/ImageTest.php:59
ERRORS!
Tests: 2005, Assertions: 6677, Errors: 1, Skipped: 1.
make: *** [test] Error 2

@jcqtc
Copy link

jcqtc commented May 28, 2018

#1484 should fix that!

But I can see another error (line 248 of the travis log), it has nothing to do with Images so it's a bit weird.

1) Faker\Test\Provider\DateTimeTest::testFixedSeedWithMaximumTimestamp
InvalidArgumentException: Start date must be anterior to end date.

/home/travis/build/fzaninotto/Faker/src/Faker/Provider/DateTime.php:134
/home/travis/build/fzaninotto/Faker/src/Faker/Provider/DateTime.php:216
/home/travis/build/fzaninotto/Faker/test/Faker/Provider/DateTimeTest.php:251

It's the dateTimeBetween function of the DateTime.php file that throw an exception because the start date isn't anterior to the end date. Maybe it's because the two dates are actualy the same (don't know if it's possible), if this is true maybe changing the > operator to >= of the line below should fix it.

if ($startTimestamp > $endTimestamp) {
    throw new \InvalidArgumentException('Start date must be anterior to end date.');
}

@fatonsopa
Copy link
Author

Strange! It's working on my side. The operator seems fine to me, as long as it checks the anterior date! It looks like the method dateTimeInInterval has somehow received a date that happened to be later than the end date!

fatonsopa added 2 commits May 29, 2018 09:19
change of package name so we can add it to packagist, and later use dev branch to get the package changes. This is temporary, until the PR is approved
@jcqtc
Copy link

jcqtc commented May 29, 2018

Opened new issue #1498

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants