Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero #96

Closed
operatorone opened this issue Feb 26, 2018 · 2 comments
Closed

Division by zero #96

operatorone opened this issue Feb 26, 2018 · 2 comments

Comments

@operatorone
Copy link

Hi, ich habe im Frontend eine Fehlermeldung entdeckt, die da lautet:

Warning: Division by zero in system/modules/dlh_googlemaps/classes/Googlemap.php on line 149
#0 system/modules/dlh_googlemaps/classes/Googlemap.php(149): __error(2, 'Division by zer...', '/homepages/26/d...', 149, Array)
#1 system/modules/dlh_googlemaps/elements/ContentMap.php(91): delahaye\googlemaps\Googlemap::getMapData('1', 'html5', Array)
#2 system/modules/core/elements/ContentElement.php(265): delahaye\googlemaps\ContentMap->compile()
#3 system/modules/dlh_googlemaps/elements/ContentMap.php(56): Contao\ContentElement->generate()
#4 system/modules/core/library/Contao/Controller.php(484): delahaye\googlemaps\ContentMap->generate()
#5 system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#6 system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()
#7 system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()
#8 system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)
#9 system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#10 system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#11 system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#12 index.php(20): Contao\FrontendIndex->run()
#13 {main}

Läuft auf einem Contao 3.5.12
dlh_geocode | 1.1.1 | 3
dlh_googlemaps | 2.3.2 | 4

@delahaye
Copy link
Owner

delahaye commented May 2, 2018

Das kann ich leider nicht nachstellen. Frag bitte mal im Forum.

@delahaye delahaye closed this as completed May 2, 2018
@trilobit-gmbh
Copy link

This happens if $arrMap['mapSize'][0] is empty which is the case if you're embedding the map with a display size setting like "Proportional | (empty) | 200".

So either the data container should reject empty fields in the first place or the Googlemap class must handle these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants