magicsunday / webtrees-pedigree-chart

SVG based pedigree chart module for webtrees genealogy application.
GNU General Public License v3.0
49 stars 16 forks source link

JSON-THROW-ON-ERROR #32

Closed benetel closed 3 years ago

benetel commented 3 years ago

Hi, I use Webtrees 2.0.16 As I activate the the pedigree chart custom module (v 1.2.5) and try to display it on my webtrees pages, the resuls is an error message :

"use of undefined constant JSON-THROW-ON-ERROR, as shown in the image

image

06Games commented 3 years ago

It seems that this error is due to a version of PHP lower than 7.3. I advise you to update your PHP installation in order to fix this problem. https://www.php.net/manual/en/json.constants.php

ddrury commented 3 years ago

Nevertheless, it's best practice to declare constants as well as classes, eg

use const JSON_THROW_ON_ERROR;

magicsunday commented 3 years ago

I created a new release for PHP 7.1 to remove this dependency. Nevertheless you should upgrade your PHP version as 7.1 is outdated.