Jump to content
Claudia M

What does this error mean?

Recommended Posts

Keep getting these errors.  What if anything should I do?  Thanks in advance for any and all help

[06-Jun-2019 08:26:52 America/Louisville] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/claudias/public_html/classes/cart.class.php on line 1196

[06-Jun-2019 08:41:51 America/Louisville] PHP Warning:  Security Warning: Illegal array key "search%5Bkeywords%5D" was detected and was removed. in /home/claudias/public_html/classes/sanitize.class.php on line 114

[06-Jun-2019 08:00:06 America/Louisville] PHP Warning:  No customer information detected. Order summary was not built or inserted. in /home/claudias/public_html/classes/order.class.php on line 1362

 

Share this post


Link to post
Share on other sites

The count warning comes from this line:

if (count($this->basket['contents']) == 0)

At some point, CubeCart decides to trash the variable basket['contents']. And PHP cannot count something that does not exist.

The customer information warning is when CubeCart wants to save (update?) an order summary, but there isn't sufficient information to do so. Without any proof, I am blaming the PayPal Pro plugin. (I understand that there is a PayPal gateway mode where the customer's PayPal customer info is sent back by PayPal and is used by CubeCart for customer data in the Order Summary. But if the customer aborts, there is nothing for CubeCart to use. Or something like that.)

Regarding the illegal array key warning... please try to determine when this started. That may be difficult as the error logs get pruned to the last 30 days (default). If you think this started when you may have started using a later version of PHP -- PHP 5 to PHP 7, then maybe PHP 7's PHP.INI file is instructing PHP to be encoding things that PHP 5 didn't.

If you think that is when these errors started (upgrading to PHP 7), then, in admin, PHP Info, check the Core table, 'input_encoding' and 'output_encoding' line items. (I have no value. And I can't find any information about these settings. They may relate to character sets and not to any pre- or post-processing of querystrings.)

 

Share this post


Link to post
Share on other sites

" The customer information warning is when CubeCart wants to save (update?) an order summary, but there isn't sufficient information to do so. Without any proof, I am blaming the PayPal Pro plugin. (I understand that there is a PayPal gateway mode where the customer's PayPal customer info is sent back by PayPal and is used by CubeCart for customer data in the Order Summary. But if the customer aborts, there is nothing for CubeCart to use. Or something like that.) "

I think I did this. Customer said they got an error (needed some code) to place an order and I was testng to see if I could get to the PayPal page - which I did.

" Regarding the illegal array key warning... please try to determine when this started. That may be difficult as the error logs get pruned to the last 30 days (default). If you think this started when you may have started using a later version of PHP -- PHP 5 to PHP 7, then maybe PHP 7's PHP.INI file is instructing PHP to be encoding things that PHP 5 didn't. "

This did start when I upgraded to PHP 7.3

41 minutes ago, bsmither said:

If you think that is when these errors started (upgrading to PHP 7), then, in admin, PHP Info, check the Core table, 'input_encoding' and 'output_encoding' line items. (I have no value. And I can't find any information about these settings. They may relate to character sets and not to any pre- or post-processing of querystrings.)

They have no value. Should I give my host this info?

Share this post


Link to post
Share on other sites

I think your host can definitely help. Your hosting tech crew may not understand why CubeCart is complaining, but if you explain that some encoded symbols (such as %5B and %5D) are not getting decoded when PHP accepts the querystring from the web server, they may know where to start looking.

Share this post


Link to post
Share on other sites

 

Now I'm getting this. Similar to first error mentioned?

[07-Jun-2019 09:08:14 America/Louisville] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/claudias/public_html/classes/catalogue.class.php on line 1898
[07-Jun-2019 09:08:14 America/Louisville] PHP Warning:  Invalid argument supplied for foreach() in /home/claudias/public_html/classes/catalogue.class.php on line 277

 

Share this post


Link to post
Share on other sites
Posted (edited)

The count warning is strange because it is coming from a statement that should only be executing if a search found something. The search query is returning something that has some truthiness to it, but it is not returning a recordset.

Is it possible that you can discover what was searched for by examining the web access logs located in your hosting control panel at [07-Jun-2019 09:08:14 America/Louisville]? It may help us determine if there is a fault in how the search is being performed. (This may be related to the encoded symbols situation discussed earlier.)

The Invalid argument warning is a consequence of the count warning.

Edited by bsmither

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.   Paste as plain text instead

  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...