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

Bug with unserialize big json from api with 200 items #21

Closed
RemcoSmitsDev opened this issue Dec 4, 2021 · 0 comments
Closed

Bug with unserialize big json from api with 200 items #21

RemcoSmitsDev opened this issue Dec 4, 2021 · 0 comments

Comments

@RemcoSmitsDev
Copy link

I'm using the following code:

use Curl\Curl;
use Spatie\Fork\Fork;

$output = Fork::new()->run(
    function () {
        $curl = new Curl();
        return $curl->get('https://jsonplaceholder.typicode.com/todos');
    }
);

var_dump($output);

When getting all the todo's from the api it will throw an exception:
Notice: unserialize(): Error at offset 8178 of 8178 bytes .... /src/Task.php line 115

I already have increased the buffer size(tried increasing until the max) but still got this problem/bug.
When i slice the array of items to 60 instead of 200 that come from that response.

Is there a solution for this problem/bug?

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

No branches or pull requests

1 participant