squatteur / webtrees-branch-statistics

This modules provides others statistics by generation for webtrees genealogy application.
GNU General Public License v3.0
8 stars 1 forks source link

non well formed numeric value encountered in chart.phtml #7

Closed hartenthaler closed 3 years ago

hartenthaler commented 3 years ago

There is an error in the webtrees logfile: A non well formed numeric value encountered …/modules_v4/webtrees-branch-statistics/resources/views/chart.phtml:367</b> <b>#0 …/modules_v4/webtrees-branch-statistics/resources/views/chart.phtml(367): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(8, &#039;A non well form...&#039;, &#039;/mnt/web312/a3/...&#039;, 367, Array)</b> <b>#1 …/modules_v4/webtrees-branch-statistics/resources/views/chart.phtml(255): calculate_median(Array)</b> #2 …/app/View.php(189): include(&#039;/mnt/web312/a3/...&#039;) #3 …/app/View.php(286): Fisharebest\Webtrees\View-&gt;render() #4 …/app/Helpers/functions.php(203): Fisharebest\Webtrees\View::make(&#039;_webtrees-branc...&#039;, Array) #5 …/app/Http/ViewResponseTrait.php(51): view(&#039;_webtrees-branc...&#039;, Array) <b>#6 …/modules_v4/webtrees-branch-statistics/src/Module.php(200): Fisharebest\Webtrees\Module\AbstractModule-&gt;viewResponse(&#039;_webtrees-branc...&#039;, Array)</b> #7 …/app/Http/Middleware/WrapHandler.php(66): Squatteur\Webtrees\BranchStatistics\Module-&gt;handle(Object(Nyholm\Psr7\ServerRequest)) #8 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler-&gt;process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) <b>#9 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsModule.php(212): Middleland\Dispatcher-&gt;handle(Object(Nyholm\Psr7\ServerRequest))</b> #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136):

squatteur commented 3 years ago

Is it possible to have more information on this bug? In which case it happens. It's linked to confidential data and the calculate_median (Array) function calculates the median of the different dates of birth for the same generation. I can't reproduce this bug.

hartenthaler commented 3 years ago

I will try to test in which cases it appears.

hartenthaler commented 3 years ago

I can reproduce this error: try it on my page with Elizabeth Stuart (I4584) and 2 generations. It is maybe related to the fact that in the next generation there is one person with a birth date in Julian calendar: Anna-von-Oldenburg. Her birth record is

1 BIRT
2 DATE @#DJULIAN@ 14 OCT 1574
squatteur commented 3 years ago

Thanks, the problem was julian date. I modify to take all calendars (French, Julian ...).

hartenthaler commented 3 years ago

Tested without any error. Thanks! Solved!