WordPress.org

Support

Support » Themes and Templates » warning division by zero in

warning division by zero in

  • Hello
     
    Here is my problem, being new at this I have no idea what to do. I created my first website using wordpress 4 months ago about it. Until now everything works perfectly, but this morning, can not connect to my site, the pages display the same error message:
     
    Warning: Division by zero in / homez.311/ludotheqt/www/wp-content/themes/mantra/admin/custom-styles.php on line 22
     
    Warning: Division by zero in / homez.311/ludotheqt/www/wp-content/themes/mantra/admin/custom-styles.php on line 23
     
    Here is my custon-styles.php (start and highlighted lines 22 and 23)
    <? php
     
    optset function ($ var, $ val1, val2 $ =”, $ val3 =”, $ val4 =”) {
    $ vals = array ($ val1, $ val2, $ val3, $ val4);
    if (in_array ($ var, $ vals)) return false; else: return true; endif;
    }
     
    mantra_custom_styles function () {
     
    / * This Retrieves admin options. * /
    = $ mantra_options mantra_get_theme_options ();
    foreach ($ mantra_options as $ key => $ value) {
          $ {“$ key”} = esc_attr ($ value);
    }
    if ($ mantra_dimselect == “Absolute”) {
    totalWidth $ + $ = $ mantra_sidewidth mantra_sidebar 50;
    $ = $ contentSize mantra_sidewidth;
    $ = $ sidebarSize mantra_sidebar;
    }
    else if ($ mantra_dimselect == “Relative”) {
    totalWidth $ + $ = $ mantra_sidewidthRel mantra_sidebarRel;
    $ contentSize = intval (($ mantra_sidewidthRel / $ totalWidth * 100) -2);
    $ sidebarSize = intval (($ mantra_sidebarRel / $ totalWidth * 100) -2);
    }

    ob_start ();>
     
    <style type=”text/css”>
    <? php
    / *
      * CSS LAYOUT
     
     
    Thank you in advance

Viewing 1 replies (of 1 total)
  • Mantra somehow lost its settings (or part of them).

    You’ll need reset WordPress to a different theme (by renaming the “mantra” folder to something else) so you can use access the Dasboard, then uninstall and reinstall Mantra to make it reset to the default settings.

    Version 2.0.2 will hopefully prevent this issue from ever happening again.

Viewing 1 replies (of 1 total)
  • The topic ‘warning division by zero in’ is closed to new replies.