Zen Cart Logo
Forums / General Questions / PHP warnings

PHP warnings

Locked

Views: 1,723

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
3 Jun 2006, 1:56 AM
#1
lep avatar

lep

New Zenner

Join Date:
Apr 2006
Location:
Menlo Park, CA
Posts:
44
Plugin Contributions:
0

PHP warnings

Hi all --

My site seems to be running fine, with no apparent or reported errors.

But I happened to check my error log, and found the following messages:

[Fri Jun 2 17:09:02 2006] [error] PHP Warning: Division by zero in /home/evesteve/public_html/zen-cart/includes/classes/split_page_results.php on line 76
[Fri Jun 2 17:09:01 2006] [error] PHP Warning: Division by zero in /home/evesteve/public_html/zen-cart/includes/classes/split_page_results.php on line 76
[Fri Jun 2 17:08:44 2006] [error] PHP Warning: Variable passed to each() is not an array or object in /home/evesteve/public_html/zen-cart/includes/classes/shopping_cart.php on line 1658
[Fri Jun 2 17:08:24 2006] [error] PHP Warning: Variable passed to each() is not an array or object in /home/evesteve/public_html/zen-cart/includes/classes/shopping_cart.php on line 1658
The first error seems to refer to the line:

$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

where, apparently, 'number_of_rows_per_page' is not getting properly set higher up in the page (it's not referenced in any other file in the site).

The other error refers to the line:

while ( list( $key, $val ) = each($_POST['products_id']) ) {

... which I'm at a loss to interpret; it's all geek to me.

As stated, though, the site seems to be working. Any ideas what's going on?

-- Larry

[edit: spelling & tense correction]

4 Jun 2006, 5:04 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: PHP warnings

What version of Zen Cart are you running?

4 Jun 2006, 2:48 PM
#3
lep avatar

lep

New Zenner

Join Date:
Apr 2006
Location:
Menlo Park, CA
Posts:
44
Plugin Contributions:
0

Re: PHP warnings

DrByte --

Latest & greatest; 1.3.0.1.

Mods installed include LinkPoint, GoogleSitemapAdmin, Master Password, Time Zone Offset (1.3.0.1) & User Tracking. Using a template based on 'future Zen' with all changes done in the override system.

Bugfixes all applied per 'http://www.zen-cart.com/forum/forumdisplay.php?f=140.'

-- Larry

6 Jun 2006, 7:12 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: PHP warnings

will keep this in mind during next round of testing related to system internals. But at present, I can't duplicate this. I'm inclined to think it's related to certain data in your database, but unable to pinpoint just what, since those portions of the code are triggered by various other sources, and never run on their own directly..... it could be coming from any number of places.

6 Jun 2006, 9:31 AM
#5
lep avatar

lep

New Zenner

Join Date:
Apr 2006
Location:
Menlo Park, CA
Posts:
44
Plugin Contributions:
0

Re: PHP warnings

DrByte --

Well, apparently I can't duplicate it either -- at least, there are no more PHP warnings since those. So if there is a bug somewhere, either in the code or in my set-up, it seems to be rare.

I'll keep an eye out & see if either happens again. If so, I'll gather as much detail as I can & re-post.

Thanks for your help! Like I said, the cart seems to be running fine in any case.

-- Larry