Title: PHP Warning (Division by zero)
Last modified: April 15, 2021

---

# PHP Warning (Division by zero)

 *  Resolved [Volodymyr](https://wordpress.org/support/users/namzzz/)
 * (@namzzz)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/)
 * I’ve noticed 2 PHP warnings after activating plugin.
 * I guess that warnings could be caused by using .svg file for logo.
 * Is there a way to fix it?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-division-by-zero-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Twentig](https://wordpress.org/support/users/twentig/)
 * (@twentig)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14331082)
 * Hi,
 * Twentig uses the dimensions of the uploaded logo to calculate some values for
   layout purpose. Can you please tell me which method (plugin, custom code…) you’re
   using to upload an svg file so I can try to replicate the issue on my side?
 * Thanks,
    Tom
 *  Thread Starter [Volodymyr](https://wordpress.org/support/users/namzzz/)
 * (@namzzz)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14331549)
 * Hello, Tom,
 * I use [SVG Support](https://wordpress.org/plugins/svg-support/) to upload .svg
   files.
 * Good luck)
 *  Plugin Author [Twentig](https://wordpress.org/support/users/twentig/)
 * (@twentig)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14335810)
 * I’ve installed the SVG Support plugin but can’t replicate the issue on my side.
   If possible, could you please share the URL of your website?
 * Thanks,
    Tom
 *  Thread Starter [Volodymyr](https://wordpress.org/support/users/namzzz/)
 * (@namzzz)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14347081)
 * Hi, Tom!
 * URL: [http://crs.kiev.ua](http://crs.kiev.ua).
 * The issue was present only with TwentyTwentyOne theme. I’ve decided to use TwentyTwenty
   instead because of certain reasons and i see no warnings)
 * If you interested, i can make another instance and try to replicate the issue
   with TTO theme.
 *  Plugin Author [Twentig](https://wordpress.org/support/users/twentig/)
 * (@twentig)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14359305)
 * Hi,
 * Thanks for the heads-up. I’ve tested multiple times but can’t replicate the issue
   on my side. Your website is password-protected, so I can’t access it. If possible,
   could you please share the URL of your SVG file (maybe it depends on the file)?
 * Tom
 *  [svincent](https://wordpress.org/support/users/svincent/)
 * (@svincent)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14645163)
 * I was able to replicate this issue and get it to work in this scenario.
 * my svg files needed `width="300" height="100"` (or whatever size your image is)
   added to the `<svg>` tag in the file prior to uploading. Without the height and
   width set the dimensions are 0x0 and causes those php errors.
 * But the mobile width and height being set to auto by twentig makes the svg image
   disappear on the smaller breakpoints.
    -  This reply was modified 4 years, 11 months ago by [svincent](https://wordpress.org/support/users/svincent/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP Warning (Division by zero)’ is closed to new replies.

 * ![](https://ps.w.org/twentig/assets/icon.svg?rev=2569439)
 * [Twentig Supercharged Block Editor – Blocks, Patterns, Starter Sites, Portfolio](https://wordpress.org/plugins/twentig/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/twentig/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/twentig/)
 * [Active Topics](https://wordpress.org/support/plugin/twentig/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/twentig/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/twentig/reviews/)

## Tags

 * [logo](https://wordpress.org/support/topic-tag/logo/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)
 * [svg](https://wordpress.org/support/topic-tag/svg/)

 * 6 replies
 * 3 participants
 * Last reply from: [svincent](https://wordpress.org/support/users/svincent/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-division-by-zero-5/#post-14645163)
 * Status: resolved