Jump to content

What does this error mean?


Claudia M

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

 

Link to comment
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.)

 

Link to comment
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?

Link to comment
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.

Link to comment
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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...