Skip to content

fixed php 7.2 Warning: count(): Parameter must be an array or an obj…#2038

Closed
firma wants to merge 1 commit into
guzzle:masterfrom
firma:master
Closed

fixed php 7.2 Warning: count(): Parameter must be an array or an obj…#2038
firma wants to merge 1 commit into
guzzle:masterfrom
firma:master

Conversation

@firma

@firma firma commented Apr 2, 2018

Copy link
Copy Markdown

…ect that implements Countable

fixed php 7.2 ,Warning: count(): Parameter must be an array or an object that implements Countable

…ct that implements Countable

fixed php 7.2 ,Warning: count(): Parameter must be an array or an object that implements Countable
@firma

firma commented Apr 2, 2018

Copy link
Copy Markdown
Author

fixed php 7.2 Warning: count(): Parameter must be an array or an object that implements Countable

@GrahamCampbell

Copy link
Copy Markdown
Member

👎 Why is this ever null. Instead, the place that incorrectly sets it to null should be fixed.

@foundVanting

Copy link
Copy Markdown

it has fix?

Comment thread src/Handler/CurlFactory.php

@Nyholm Nyholm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with @GrahamCampbell. Why is $this->handles null? We should fix that.

@sagikazarmark

Copy link
Copy Markdown
Member

After a quick look: I don't see any code paths that would end up in $handles being null.

@marekr

marekr commented Apr 23, 2018

Copy link
Copy Markdown

I have the same error in my codebase....I'll take a look at what exactly is failing.

@pfrenssen

Copy link
Copy Markdown

This has been fixed in #1686. This can be closed.

unset($easy->handle);

if (count($this->handles) >= $this->maxHandles) {
if (is_array($this-handles) && count($this->handles) >= $this->maxHandles) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing > in this - handeles

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

the count function does support null in php 7.2 .

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This works for js_composer

@sagikazarmark sagikazarmark mentioned this pull request Nov 20, 2018

@GrahamCampbell GrahamCampbell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR is no longer required, and can be closed.

@GrahamCampbell

Copy link
Copy Markdown
Member

Ping.

@Nyholm Nyholm closed this Dec 8, 2019
@dj12342

dj12342 commented Jan 16, 2020

Copy link
Copy Markdown

@extends('layouts.app')

@section('content')

    <h1> {{$title}}</h1>

    @if(count($Services > 1))

     <ul>

       @foreach($Services as $Services)

            <li>{{$Services}}</li>

       @endforeach

    </ul>

@endif

@endsection

@BestOlumese

Copy link
Copy Markdown

@extends('layouts.app')

@section('content')

<h1> {{$title}}</h1>

@if(count($Services > 1))

 <ul>

   @foreach($Services as $Services)

        <li>{{$Services}}</li>

   @endforeach

</ul>

@endif

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.