Jump to content
techboyac

Error code when I run localhost

Recommended Posts

Hi, I still a noob in PHP programming I hope somebody in the forum can help me and give an ideas how to fixed to this problem,

everytime I run localhost this message appear:

ErrorException in Builder.php line 1023:count(): Parameter must be an array or an object that implements Countable

But if I type localhost/(anycharacter) the page appear but with error 404(kindly refer to image, all other buttons are working except the one indicated with the arrow( kindly refer on the last image, note: app_debug set to true), this problem keeps bugging me for a few weeks now that I still cannot find a way to fixed it. Thank you in advance.

pic3.jpg)

new2.jpg

 

Share this post


Link to post
Share on other sites

Look at the backtrace to find what part of your code is running. Look for problems there. If you can't find the problem, post the code for the method.

Share this post


Link to post
Share on other sites
46 minutes ago, requinix said:

Look at the backtrace to find what part of your code is running. Look for problems there. If you can't find the problem, post the code for the method.

Kindly check the image sir,  the line where the error get stuck is highlighted, thank you 

https://i.postimg.cc/CKKWsqGL/New1.jpg

Share this post


Link to post
Share on other sites

Your code. Not Laravel. Because the problem is going to be with your code, not theirs.

  • Like 1

Share this post


Link to post
Share on other sites

there is something wrong with $query->wheres, it's not countable. So it's not an array or not an object. Do var_dump($query->wheres); after the $query =   to find out what it is and what it does contain.  

  • Like 1

Share this post


Link to post
Share on other sites

The $query from $this->getQuery() does not have a valid - as of PHP 7.2 - property.

Prior to PHP 7.2, the result of count() with an invalid parameter would have been misleading (a 0 or 1).

Suggest verifying if this package has been updated to work with PHP 7.2.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.