Countries
Countries copied to clipboard
Uncaught Error: Undefined constant 'JSON_THROW_ON_ERROR'
i got error
<br />
<b>Fatal error</b>: Uncaught Error: Undefined constant 'JSON_THROW_ON_ERROR' in /var/www/html/vendor/annexare/countries-list/dist/index.php:35
Stack trace:
#0 /var/www/html/vendor/annexare/countries-list/dist/index.php(58): Annexare\Countries\load('countries.min.j...')
#1 /var/www/html/proxyWorking.php(113): Annexare\Countries\countries()
#2 {main}
thrown in <b>/var/www/html/vendor/annexare/countries-list/dist/index.php</b> on line <b>35</b><br />
OS: ubuntu 18.x php: 7.2
composer.json
{
"$schema": "https://raw.githubusercontent.com/composer/composer/main/res/composer-schema.json",
"name": "dimaslanjaka/php-proxy-hunter",
"description": "PHP Proxy Hunter",
"type": "library",
"license": "MIT",
"autoload": {
"psr-4": {
"PhpProxyHunter\\": "src/"
},
"files": ["data/webgl.php"]
},
"authors": [
{
"name": "dimaslanjaka",
"email": "[email protected]"
}
],
"require": {
"composer-plugin-api": "^2.3",
"annexare/countries-list": "^3.1",
"geoip2/geoip2": "^2.13",
"maxmind/web-service-common": "^0.9.0"
}
}
Yes, seems like not all versions of PHP support that.
You can add something like this for now, I'll make an update on this a bit later:
if (!defined('JSON_THROW_ON_ERROR')) {
define('JSON_THROW_ON_ERROR', 4194304);
}
Yes, seems like not all versions of PHP support that.
You can add something like this for now, I'll make an update on this a bit later:
if (!defined('JSON_THROW_ON_ERROR')) { define('JSON_THROW_ON_ERROR', 4194304); }
waiting next patch