Skip to content
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

Upgrade JanePHP and rebuild the classes #108

Merged
merged 1 commit into from
Mar 16, 2021
Merged

Conversation

damienalexandre
Copy link
Member

In an attempt to fix #107 - JanePHP released a minor patch avoiding this kind of error:

Warning: is_file(): File name is longer than the maximum allowed path length on this platform (4096)

Example: https://3v4l.org/6SfuH

This PR upgrade JanePHP and regenerate the client with this fix. Thanks to @Korbeil for the JanePHP fix!

@@ -61,7 +61,8 @@ public function executeEndpoint(Endpoint $endpoint, string $fetch = self::FETCH_
$request = $request->withBody($body);
} elseif (\is_resource($body)) {
$request = $request->withBody($this->streamFactory->createStreamFromResource($body));
} elseif (is_file($body)) {
} elseif (\strlen($body) <= 4000 && is_file($body)) {
// more than 4096 chars will trigger an error
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damienalexandre what's the matter with 4096 chars?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated in the PR description,
Calling is_file with a very long path will throw a PHP error. So this change prevent the error from happening.

Did you get an issue with this change?

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

Successfully merging this pull request may close these issues.

long chat message throws an Exception
3 participants