Find out more about the “Show Off Your Avatar Campaign
RocketTheme  |  General  |  The Water Cooler  |  Topic: Warning: Division by zero in rt_splitmenu.php « previous next »
Pages: 1 [2] 3 Go Down Print
Author Topic: Warning: Division by zero in rt_splitmenu.php  (Read 24190 times)
Preben Olsen Sangvik
Newbie
*
Offline Offline

Posts: 14

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #15 on: November 23, 2006, 12:30:44 AM »

Quick fix worked. :-)

Can this error come from server config?
(Seamed to come after server move: my host upgraded servers...)
Logged
J.M. Sanders
Newbie
*
Offline Offline

Posts: 10

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #16 on: November 23, 2006, 06:37:09 AM »

Yes, my host also updated php and changed some things with vars I believe.

I did some searching and there are other sites out there that use ModernBusiness which have this problem. I didn't find a solution yet.

I'll try the quick fix. Thanks!
« Last Edit: November 23, 2006, 12:53:34 PM by J.M. Sanders » Logged
Preben Olsen Sangvik
Newbie
*
Offline Offline

Posts: 14

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #17 on: November 23, 2006, 06:40:30 AM »

I will also let you know that I tried a total new install of the template - after the webhotel upgrade - but still didn't work.

Use the quick fix for now...
Logged
J.M. Sanders
Newbie
*
Offline Offline

Posts: 10

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #18 on: November 23, 2006, 12:53:02 PM »

Quick fix works. Smiley
Thanks!!
Logged
Preben Olsen Sangvik
Newbie
*
Offline Offline

Posts: 14

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #19 on: December 01, 2006, 08:58:26 AM »

OK, I now know what couses it:

My host just, and I mean just, upgraded to PHP 5.2.0 from PHP 5

that made this warning arrive...

Logged
Andy Miller
RocketTheme
Hero Rocketteer
*
Offline Offline

Posts: 5974


RTTC Kahuna

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #20 on: December 01, 2006, 09:28:44 AM »

did you try implementing this:

Code:
quick fix, replace that line 62 you just added with:

error_reporting(0);
Logged
Preben Olsen Sangvik
Newbie
*
Offline Offline

Posts: 14

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #21 on: December 01, 2006, 10:17:47 AM »

Oh yes,
and it works.  Smiley

Just wanted to let you know why it didn't show before - and suddenly came...

It's most probably that it doesn't show on PHP 5 but on PHP 5.2.0  Wink
Logged
Alistair Brown
Jr. Rocketeer
**
Offline Offline

Posts: 21

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #22 on: December 09, 2006, 03:37:53 PM »

Got the same problem and thanks for the quuick fix. Smiley
Logged
Martin Hagen
Newbie
*
Offline Offline

Posts: 17

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #23 on: February 07, 2007, 02:17:31 AM »

Oh yes,
and it works.  Smiley

Just wanted to let you know why it didn't show before - and suddenly came...

It's most probably that it doesn't show on PHP 5 but on PHP 5.2.0  Wink

to be right cause have the same problem (server upgrade 5 to 5.2) and it appears... i use error reporting off and it works, but is this the final solution? 
Logged
Dimitri
Newbie
*
Offline Offline

Posts: 9

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #24 on: February 22, 2007, 01:58:59 PM »

Any real solution on this error?
Logged
Ako
Newbie
*
Offline Offline

Posts: 12


Re: Warning: Division by zero in rt_splitmenu.php
« Reply #25 on: March 02, 2007, 07:40:55 AM »

quick fix, replace that line 62 you just added with:

error_reporting(0);

All of a sudden, out of the blue, I got the same error message on one of my sites. A quick search in this forum and I got the error message to vanish again. Thanks for the solution, Andy  Smiley
Logged
Alistair Nelson
Newbie
*
Offline Offline

Posts: 12

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #26 on: April 07, 2007, 04:21:31 AM »

I just got this error as well, bluehost.com must have done the same php update. For me it is in the extermities template. Thanks for quick fix.
Logged
Micah Johnson
Rocketeer
***
Offline Offline

Posts: 95


Re: Warning: Division by zero in rt_splitmenu.php
« Reply #27 on: October 16, 2007, 02:24:28 PM »

hi, just testing an old site on a new server with PHP5.x and got this error... quick fix stopped the errors but broke other things... such as SIFR and some other blocks...

this solved it: http://www.joomlaportal.de/joomla-templates/89527-fehler-im-template.html

the skinny is: look at the code in post 5...  add the line 62+ code and replace the original line 80 with the appropriate 80+ code... solved.

Just thought I'd share!
Logged

I'm an Individual, just like everyone else...
Beev Yarr
Newbie
*
Offline Offline

Posts: 3


WWW
Re: Warning: Division by zero in rt_splitmenu.php
« Reply #28 on: October 22, 2007, 07:30:36 PM »

Good Call.

This worked for me as well. http://www.joomlaportal.de/joomla-templates/89527-fehler-im-template.html.

Of course I thought I'd have to translate it first, but the fix is actually pretty simple to follow. Translated from Google:

Quote
If the number of elements in the array containing 0,Then an element in the array. Here is 0, so that the array contains an element and it will not be through Zero divided.

Line: 62 (Add)
PHP code:
Code:
if( count($tab_colors)==0 ) {
    $tab_colors = array(0);

Now, however, a 0 at the beginning of the string of active menu item and
As a class name of the other classes on board.
Since numbers do not at the beginning of a CSS class are allowed and
All classes without value in the array of class = "" be spent if
We leglich remove the zero, we all figures in the early
CSS class, and also set the class only if it is something out there.

Line: 80 (substitute)

Code:
$ Id = 'class = "'. $ Id. ' "';

by:

Code:
if( is_numeric( $id{0} ) ) {
    $id = substr( $id, 1, strlen($id)-1 );
}
$id = !empty($id) ? ' class="' . $id . '"' : '';


Gruß
Ec
Logged
Fabio Pierrottet
Professional
Newbie
*
Offline Offline

Posts: 13

Re: Warning: Division by zero in rt_splitmenu.php
« Reply #29 on: November 19, 2007, 10:46:33 AM »

cant fix this problem by put error reporting 0 on line 62  Sad
Logged
Pages: 1 [2] 3 Go Up Print 
RocketTheme  |  General  |  The Water Cooler  |  Topic: Warning: Division by zero in rt_splitmenu.php « previous next »
Jump to: